I put this at the top of my scripts to avoid running on frames or iframes:
if (window.top != window.self) //don't run on frames or iframes
return;
More Related Contents:
- Choosing and activating the right controls on an AJAX-driven site
- jQuery in Greasemonkey 1.0 conflicts with websites using jQuery
- Run Greasemonkey script on the same page, multiple times?
- How to get an AJAX get-request to wait for the page to be rendered before returning a response?
- Can a website know if I am running a userscript?
- How to use greasemonkey to selectively remove content from a website
- Simulating a mousedown, click, mouseup sequence in Tampermonkey?
- Userscript to wait for page to load before executing code techniques?
- How to change a class CSS with a Greasemonkey/Tampermonkey script?
- Save images to hard disk WITHOUT prompt?
- Detecting combination keypresses (Control, Alt, Shift)?
- Storing user login/password input in a Greasemonkey script on install
- How to override the alert function with a userscript?
- Add a JavaScript button using Greasemonkey or Tampermonkey?
- How do I get Greasemonkey to click on a button that only appears after a delay?
- Chrome 65 blocks cross-origin . Client-side workaround to force download?
- How can I intercept XMLHttpRequests from a Greasemonkey script?
- 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
- How can I detect visited and unvisited links on a page?
- UserScripts & Greasemonkey: calling a website’s JavaScript functions
- “getElementById not a function” when trying to parse an AJAX response?
- How to simulate typing in input field using jQuery?
- Why doesn’t document.addEventListener(‘load’, function) work in a greasemonkey script?
- How can you determine the file size in JavaScript?
- Closure in Javascript [duplicate]
- How do I click on this button with Greasemonkey?
- How to use GM_xmlhttpRequest in Injected Code?
- Watch for element creation in greasemonkey script?
- Error: Permission denied to access property ‘handler’