Skip to content

Instantly share code, notes, and snippets.

@mooz
Created December 24, 2011 07:52
Show Gist options
  • Save mooz/1516724 to your computer and use it in GitHub Desktop.
Save mooz/1516724 to your computer and use it in GitHub Desktop.
HoK Settings
plugins.options["hok.actions"] = [];
plugins.options["hok.actions"].push(
['g',
"Inspect element in Firebug",
function (elem) { Firebug.Inspector.inspectFromContextMenu(elem); },
false, false, "*"]
);
plugins.options["hok.actions"].push(
['m',
"Open context menu",
function (elem) { plugins.hok.openContextMenu(elem); },
false, false, "*"]
);
plugins.options["hok.actions"].push(
['o',
"Mouse over",
function (elem) {
let doc = elem.ownerDocument;
let offsetX = 1;
let offsetY = 1;
// elem.focus();
["mouseover"].forEach(
function (event) {
elem.dispatchEvent(
plugins.hok.createMouseEvent(
doc,
event, {
screenX: offsetX, screenY: offsetY
}
)
);
}
);
}]
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment