From 0527544c28da10d257cc04ec2e50593dd07384df Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Tue, 15 Oct 2013 02:33:21 +1100 Subject: Fix 'yankshort' for YouTube. Only full page requests currently appear to update link[rel='shortlink']. Fixes issue #1074. --- common/modules/buffer.jsm | 6 ++++++ 1 file changed, 6 insertions(+) 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(); -- cgit v1.2.3