Block IFrames JS Code
Posted: Fri Jun 03, 2011 11:31 pm
Hello,
I've read about NoScript's ability to block IFrames. I desperately try to do this for Opera, however I want to filter them, based on the URL. However, I couldn't find a way to block the IFrame before it opens the specified source URL. Is NoScript able to do this? Could someone tell me where I can find the code for that in NoScript, or has an idea how to do this in JS? I only want to block external IFrames, that match these RegExp:.
Currently I edit websites with Proxomitron, where I can block non-scripted IFrames. Then I tried to edit all JS methods, that can create IFrames (I replaced document.write, rewrote XMLHttpRequests, DOMNodeInserted...), but these may lead to further problems. If someone has a direct solution to block IFrames in JS, please help me.
I've read about NoScript's ability to block IFrames. I desperately try to do this for Opera, however I want to filter them, based on the URL. However, I couldn't find a way to block the IFrame before it opens the specified source URL. Is NoScript able to do this? Could someone tell me where I can find the code for that in NoScript, or has an idea how to do this in JS? I only want to block external IFrames, that match these RegExp:
Code: Select all
"[?*&=,~-]http(?::|%3A)(?:\/|%2F)(?:\/|%2F)"
Currently I edit websites with Proxomitron, where I can block non-scripted IFrames. Then I tried to edit all JS methods, that can create IFrames (I replaced document.write, rewrote XMLHttpRequests, DOMNodeInserted...), but these may lead to further problems. If someone has a direct solution to block IFrames in JS, please help me.