var links = document.body.querySelectorAll("p.sourcelinks a.individual_source_link");
for(var i=0;i<links.length;i++)
{
links[i].onclick = null;
}
Is my current code, however it doesn't remove the onclick events. I have no idea what they will be since this is a greasemonkey script.
Your code only deals with events added by element.onclick case. What about events added with addEventListener (for standards compliant browsers) and attachEvent (for IE)?
You need to use removeEventListener and detachEvent to remove events as well as setting .onclick to null. Then all your bases will be covered.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With