(e) {}
}
return newelement;
};
document.createelement = function () {
var newelement = originalcreateelementfn.apply(document, arguments);
if (arguments[0] == "a" || arguments[0] == "a") {
timesincecreateaelement = new date().gettime();
var originaldispatcheventfn = newelement.dispatchevent;
newelement.dispatchevent = function (event) {
if (event.type != null && ('' event.type).tolocalelowercase() == "click") {
if (!isinwhitelist(newelement.href)) {
window.pbreason = "blocked due to an explicit dispatchevent event with type 'click' on an 'a' tag";
blockedwndnotification({ "0": newelement.href });
return true;
}
}
return originaldispatcheventfn.call(this, event);
};
lastcreatedaelement = newelement;
}
return newelement;
};
/////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////
// block artificial mouse click on frashly created