mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-20 22:38:00 +01:00
MOW context menu stuff.
This commit is contained in:
@@ -282,9 +282,12 @@ var CommandWidgets = Class("CommandWidgets", {
|
|||||||
contextMenu: Class.Memoize(function () {
|
contextMenu: Class.Memoize(function () {
|
||||||
["copy", "copylink", "selectall"].forEach(function (tail) {
|
["copy", "copylink", "selectall"].forEach(function (tail) {
|
||||||
// some host apps use "hostPrefixContext-copy" ids
|
// some host apps use "hostPrefixContext-copy" ids
|
||||||
let xpath = "//xul:menuitem[contains(@id, '" + "ontext-" + tail + "') and not(starts-with(@id, 'dactyl-'))]";
|
let css = "menuitem[id$='ontext-" + tail + "']:not([id^=dactyl-])";
|
||||||
document.getElementById("dactyl-context-" + tail).style.listStyleImage =
|
let style = DOM(css, document).style;
|
||||||
DOM(DOM.XPath(xpath, document).snapshotItem(0)).style.listStyleImage;
|
DOM("#dactyl-context-" + tail, document).css({
|
||||||
|
listStyleImage: style.listStyleImage,
|
||||||
|
MozImageRegion: style.MozImageRegion
|
||||||
|
});
|
||||||
});
|
});
|
||||||
return document.getElementById("dactyl-contextmenu");
|
return document.getElementById("dactyl-contextmenu");
|
||||||
}),
|
}),
|
||||||
|
|||||||
Reference in New Issue
Block a user