mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 12:07:59 +01:00
Update gP for new activation system. Add comment.
This commit is contained in:
@@ -1535,15 +1535,16 @@ const Buffer = Module("buffer", {
|
|||||||
mappings.add(myModes, ["gP"],
|
mappings.add(myModes, ["gP"],
|
||||||
"Open (put) a URL based on the current clipboard contents in a new buffer",
|
"Open (put) a URL based on the current clipboard contents in a new buffer",
|
||||||
function () {
|
function () {
|
||||||
dactyl.open(dactyl.clipboardRead(),
|
let url = dactyl.clipboardRead();
|
||||||
dactyl[options.get("activate").has("paste") ? "NEW_BACKGROUND_TAB" : "NEW_TAB"]);
|
dactyl.assert(url, "No clipboard data");
|
||||||
|
dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB, background: true });
|
||||||
});
|
});
|
||||||
|
|
||||||
mappings.add(myModes, ["p", "<MiddleMouse>"],
|
mappings.add(myModes, ["p", "<MiddleMouse>"],
|
||||||
"Open (put) a URL based on the current clipboard contents in the current buffer",
|
"Open (put) a URL based on the current clipboard contents in the current buffer",
|
||||||
function () {
|
function () {
|
||||||
let url = dactyl.clipboardRead();
|
let url = dactyl.clipboardRead();
|
||||||
dactyl.assert(url);
|
dactyl.assert(url, "No clipboard data");
|
||||||
dactyl.open(url);
|
dactyl.open(url);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -1551,7 +1552,7 @@ const Buffer = Module("buffer", {
|
|||||||
"Open (put) a URL based on the current clipboard contents in a new buffer",
|
"Open (put) a URL based on the current clipboard contents in a new buffer",
|
||||||
function () {
|
function () {
|
||||||
let url = dactyl.clipboardRead();
|
let url = dactyl.clipboardRead();
|
||||||
dactyl.assert(url);
|
dactyl.assert(url, "No clipboard data");
|
||||||
dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB });
|
dactyl.open(url, { from: "paste", where: dactyl.NEW_TAB });
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -747,6 +747,9 @@ const CommandLine = Module("commandline", {
|
|||||||
function openLink(where) {
|
function openLink(where) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
// FIXME: Why is this needed? --djk
|
// FIXME: Why is this needed? --djk
|
||||||
|
// : It seems to be a hack so that AnchorElements
|
||||||
|
// don't need their URLs in their @href and their
|
||||||
|
// text content. I'd rather be rid of it. --Kris
|
||||||
if (event.target.getAttribute("href") == "#")
|
if (event.target.getAttribute("href") == "#")
|
||||||
dactyl.open(event.target.textContent, where);
|
dactyl.open(event.target.textContent, where);
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user