![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi everyone :-) , I searched the forum to look for an answer to my query but did not find a match. I'm trying to write a small script which would be able to identify whether a site is using pop ups or not. Could someone please let me have a pointer as to what I should be looking for in the code? Looking for tags like <SCRIPT LANGUAGE="JavaScript">, and for function, window.open, onload might be able to tell me that the site used popups. Is there a better way to to do this. If anyone knows of a tool/script which can identify popup code inside the HTML source,I would greatly appreciate any info about it. Thanks in advance, |
#3
| |||
| |||
|
|
newbiegalore said the following on 2/8/2008 7:15 PM: Hi everyone :-) , I searched the forum to look for an answer to my query but did not find a match. I'm trying to write a small script which would be able to identify whether a site is using pop ups or not. Could someone please let me have a pointer as to what I should be looking for in the code? Looking for tags like <SCRIPT LANGUAGE="JavaScript">, and for function, window.open, onload might be able to tell me that the site used popups. Is there a better way to to do this. If anyone knows of a tool/script which can identify popup code inside the HTML source,I would greatly appreciate any info about it. Thanks in advance, No need to look for <script> as the code doesn't have to be in a script block. onclick="window.open(this.href)" in a link is one example. Searching for window.open may not suffice either as you can break up the call by assigning a reference to window and then using winRef.open or they could be using window['open']('someURL') -- Randy Chance Favors The Prepared Mind comp.lang.javascript FAQ -http://jibbering.com/faq/index.html Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/ |
#4
| |||
| |||
|
|
On Feb 8, 6:53 pm, Randy Webb <HikksNotAtH... (AT) aol (DOT) com> wrote: newbiegalore said the following on 2/8/2008 7:15 PM: Hi everyone :-) , I searched the forum to look for an answer to my query but did not find a match. I'm trying to write a small script which would be able to identify whether a site is using pop ups or not. Could someone please let me have a pointer as to what I should be looking for in the code? Looking for tags like <SCRIPT LANGUAGE="JavaScript">, and for function, window.open, onload might be able to tell me that the site used popups. Is there a better way to to do this. If anyone knows of a tool/script which can identify popup code inside the HTML source,I would greatly appreciate any info about it. Thanks in advance, No need to look for <script> as the code doesn't have to be in a script block. onclick="window.open(this.href)" in a link is one example. Searching for window.open may not suffice either as you can break up the call by assigning a reference to window and then using winRef.open or they could be using window['open']('someURL') -- Randy Chance Favors The Prepared Mind comp.lang.javascript FAQ -http://jibbering.com/faq/index.html Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/ So then if there are a large number of ways to "obfuscate" the call to make a new window, is there a common call which all of these approaches make? I mean that if they all call a window-open event or use a library to do so can I detect it using ld? Sorry if my question seems a bit lame..I'm an absolute n00b with JS. What's the generic way for a pop-up blocker to understand that a pop- up is trying to open up? |
#5
| |||
| |||
|
|
newbiegalore said the following on 2/8/2008 10:40 PM: On Feb 8, 6:53 pm, Randy Webb <HikksNotAtH... (AT) aol (DOT) com> wrote: newbiegalore said the following on 2/8/2008 7:15 PM: Hi everyone :-) , I searched the forum to look for an answer to my query but did not find a match. I'm trying to write a small script which would be able to identify whether a site is using pop ups or not. Could someone please let me have a pointer as to what I should be looking for in the code? Looking for tags like <SCRIPT LANGUAGE="JavaScript">, and for function, window.open, onload might be able to tell me that the site used popups. Is there a better way to to do this. If anyone knows of a tool/script which can identify popup code inside the HTML source,I would greatly appreciate any info about it. Thanks in advance, No need to look for <script> as the code doesn't have to be in a script block. onclick="window.open(this.href)" in a link is one example. Searching for window.open may not suffice either as you can break up the call by assigning a reference to window and then using winRef.open or they could be using window['open']('someURL') -- Randy Chance Favors The Prepared Mind comp.lang.javascript FAQ -http://jibbering.com/faq/index.html Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/ So then if there are a large number of ways to "obfuscate" the call to make a new window, is there a common call which all of these approaches make? I mean that if they all call a window-open event or use a library to do so can I detect it using ld? Sorry if my question seems a bit lame..I'm an absolute n00b with JS. What's the generic way for a pop-up blocker to understand that a pop- up is trying to open up? Any of them are going to try to intercept a call to window.open, determine if it was user initiated or not, and let the call be issued. Some of the more aggressive blockers simply redefine the window.open method and make it impossible to open a new window. Some are capable of intercepting target="new_window" type attributes on links and force it into the current window. -- Randy Chance Favors The Prepared Mind comp.lang.javascript FAQ -http://jibbering.com/faq/index.html Javascript Best Practices -http://www.JavascriptToolbox.com/bestpractices/ |
#6
| |||
| |||
|
|
Thanks for the great tips :-). I found http://www.webmasterworld.com/forum91/4090.htm which provides some more info regarding what you have said..I'll try to figure it out. |
![]() |
| Thread Tools | |
| Display Modes | |
| |