mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-02-23 19:45:46 +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],
|
mappings.add([modes.NORMAL],
|
||||||
["y", "<yank-location>"], "Yank current location to the clipboard",
|
["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],
|
mappings.add([modes.NORMAL],
|
||||||
["<C-a>", "<increment-url-path>"], "Increment last number in URL",
|
["<C-a>", "<increment-url-path>"], "Increment last number in URL",
|
||||||
|
|||||||
Reference in New Issue
Block a user