Document.oncontextmenu, component is not available (firefox)
- by Tom J Nowell
I have a script for a website, and one of the things ti does right at the end if attempt to disable an anti-right click protection in a website
if($("span[class=MembersNameDisplay]").exists()){
var list_row = document.getElementsByTagName('script');
if(list_row != null){
list_row[0].parentNode.removeChild(list_row[0]);
}
}
document.oncontextmenu=new Function("return true");
In google chrome this works, however in firefox with greasemonkey, the last line fails and the protection is not removed.
Error: Component is not available Line: 171
How do I fix this, and why does it fail under firefox?