diff options
author | Doug Kearns <dougkearns@gmail.com> | 2013-10-15 02:33:21 +1100 |
---|---|---|
committer | Doug Kearns <dougkearns@gmail.com> | 2013-10-15 02:33:21 +1100 |
commit | 0527544c28da10d257cc04ec2e50593dd07384df (patch) | |
tree | 5454367234b49e2f24c4b462994cccd044d3ea75 /common | |
parent | f6fe33832d4cc15a5676d9017f03bf37093d8518 (diff) | |
download | pentadactyl-0527544c28da10d257cc04ec2e50593dd07384df.tar.gz |
Fix 'yankshort' for YouTube.
Only full page requests currently appear to update link[rel='shortlink'].
Fixes issue #1074.
Diffstat (limited to 'common')
-rw-r--r-- | common/modules/buffer.jsm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/modules/buffer.jsm b/common/modules/buffer.jsm index 2350e3b7..1b8695dd 100644 --- a/common/modules/buffer.jsm +++ b/common/modules/buffer.jsm @@ -2707,6 +2707,12 @@ Buffer.addPageInfoSection("s", "Security", function (verbose) { } }); +// internal navigation doesn't currently update link[rel='shortlink'] +Buffer.addURIShortener("youtube.com", (uri, doc) => + util.newURI("http://youtu.be/" + + array.toObject(uri.query.split("&") + .map(p => p.split("="))).v)); + // catch(e){ if (!e.stack) e = Error(e); dump(e.fileName+":"+e.lineNumber+": "+e+"\n" + e.stack); } endModule(); |