There is no way to cleanly remove an event handler unless you stored a reference to the event handler at creation.
I will generally add these to the main object on that page, then you can iterate and cleanly dispose of them when done with that object.
More Related Contents:
- Why is window (and unsafeWindow) not the same from a userscript as from a tag?
- Injecting JS functions into the page from a Greasemonkey script on Chrome
- Can a website know if I am running a userscript?
- Simulating a mousedown, click, mouseup sequence in Tampermonkey?
- How to change a class CSS with a Greasemonkey/Tampermonkey script?
- UserScripts & Greasemonkey: calling a website’s JavaScript functions
- Save images to hard disk WITHOUT prompt?
- How can I load a shared web worker with a user-script?
- Why doesn’t document.addEventListener(‘load’, function) work in a greasemonkey script?
- How to override the alert function with a userscript?
- How to use GM_xmlhttpRequest in Injected Code?
- Clicking a button on a page using a Greasemonkey/userscript in Chrome
- Chrome userscript error: “Unsafe JavaScript attempt to access frame”
- How to pass arguments to addEventListener listener function?
- Choosing and activating the right controls on an AJAX-driven site
- JS li tag onclick not working on IE8
- addEventListener in Internet Explorer
- add event listener on elements created dynamically
- Javascript – How to detect if document has loaded (IE 7/Firefox 3)
- How to check whether dynamically attached event listener exists or not?
- Binding multiple events to a listener (without JQuery)?
- How can I intercept XMLHttpRequests from a Greasemonkey script?
- Detect iFrame embedding in Javascript
- How can I detect visited and unvisited links on a page?
- How can two instances of a userscript communicate between frames?
- How to simulate typing in input field using jQuery?
- How can you determine the file size in JavaScript?
- Closure in Javascript [duplicate]
- Storing user login/password input in a Greasemonkey script on install
- How do I click on this button with Greasemonkey?