mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-28 14:02:36 +01:00
Yank short URL with 'y' if provided.
This commit is contained in:
@@ -1833,7 +1833,11 @@ var Buffer = Module("Buffer", {
|
||||
|
||||
mappings.add([modes.NORMAL],
|
||||
["y", "<yank-location>"], "Yank current location to the clipboard",
|
||||
function () { dactyl.clipboardWrite(buffer.uri.spec, true); });
|
||||
function () {
|
||||
let link = DOM("link[href][rev=canonical], link[href][rel=shortlink]", buffer.doc);
|
||||
let url = link.length ? link.attr("href") : buffer.uri.spec;
|
||||
dactyl.clipboardWrite(url, true);
|
||||
});
|
||||
|
||||
mappings.add([modes.NORMAL],
|
||||
["<C-a>", "<increment-url-path>"], "Increment last number in URL",
|
||||
|
||||
Reference in New Issue
Block a user