1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2025-12-28 10:32:27 +01:00

Fix 'yankshort' for YouTube.

Only full page requests currently appear to update link[rel='shortlink'].

Fixes issue #1074.
This commit is contained in:
Doug Kearns
2013-10-15 02:33:21 +11:00
parent f6fe33832d
commit 0527544c28

View File

@@ -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();