mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-04-04 05:13:32 +02:00
Security magic.
This commit is contained in:
@@ -859,8 +859,10 @@ var Dactyl = Module("dactyl", XPCOM(Ci.nsISupportsWeakReference, ModuleBase), {
|
|||||||
|
|
||||||
events: {
|
events: {
|
||||||
click: function onClick(event) {
|
click: function onClick(event) {
|
||||||
if (event.originalTarget instanceof Element) {
|
let elem = event.originalTarget;
|
||||||
let command = event.originalTarget.getAttributeNS(NS, "command");
|
|
||||||
|
if (elem instanceof Element && services.security.isSystemPrincipal(elem.nodePrincipal)) {
|
||||||
|
let command = elem.getAttributeNS(NS, "command");
|
||||||
if (command && event.button == 0) {
|
if (command && event.button == 0) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user