Welcome to WebmasterWorld Guest from 23.20.37.222

Forum Moderators: open

Message Too Old, No Replies

Stopping Norton Antivirus's popup blocker

if(window.SymError)

     
1:15 am on Feb 8, 2006 (gmt 0)

5+ Year Member



Hi guys as far as i know the javaScript which Norton Internet Security inserted into IE and FF Browsers to block pop-up and disable "window.open" in every pages, and we have discussed here, although this topic has closed but i still concern about it, you can find the discussion here
[webmasterworld.com...]
and this is the code from NAV:
<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
return (new Object());
}

window.open = SymWinOpen;

//-->
</script>
at first i did not know what this code is, i asked my friend and he thought that was spy ware in my PC.
now i have found a simple way to kick this ass
it's quite simple to block this code

just put this qoute on the top of your <!-- <html> pages, but don't block it:
just do this: <!-- <html> and this is the rest of your page.

and that's it, it does the job
now have a go with it, and let me know

gph

5:39 am on Feb 8, 2006 (gmt 0)

10+ Year Member



I know little about Norton.

Having said that I copied the posted Norton script and tried this. It seems to work but it's too simple. Norton must be doing more elsewhere and/or I'm not understanding how their popup blocker works.

(typeof SymRealWinOpen=='undefined'?window.open:SymRealWinOpen)(url);
8:28 am on Feb 8, 2006 (gmt 0)

5+ Year Member



I think the program will ignore a blank page, and as it see the qoute in html page like this <!-- <html> page code </html>//--> it thought that is a comment, and everything above it is blank, now try to make a blank page and put it on your website then view source a blank page, there wouldn't be Norton's code in it.
simetimes simple thing can solve a complicated thing :-)
11:32 am on Feb 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



An interesting discovery.

However, I think many people would be rather wary of enclosing their entire document in a comment tag, choosing to avoid using popup windows instead.

2:07 pm on Feb 8, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



As well, I'm rather suspicious of the validation implications, not to mention that if a browser decides to take the open comment tag literally, it won't render the page at all.

Another approach that might work would be to assign the original window.open, etc. to variables before Norton does its magic, then through a delayed script reassign the values to their original objects.

Still, that would do nothing to circumvent native popup blockers, such as employed by Firefox and others. In those cases CSS probably offers the best alternative.

gph

5:56 am on Feb 9, 2006 (gmt 0)

10+ Year Member



Well I got curious and downloaded the NIS 15 day trial. What I posted above works.

A 40mb download with, what looks like to me, 15 minutes of thought put into the popup blocker.

6:02 am on Feb 9, 2006 (gmt 0)

WebmasterWorld Senior Member drdoc is a WebmasterWorld Top Contributor of All Time 10+ Year Member



(typeof SymRealWinOpen=='undefined'?window.open:SymRealWinOpen)(url);

I'd much rather use that than the open comment thingy :)

1:59 pm on Feb 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure it's quite that simple, DrDoc. It has been years since I ran Norton on Windows and I eschew popups vehemently, but as I recall the Norton code was actually far more extensive than what has been posted. The program on my machine appended code both to the head and after the closing html tag. It not only reassigned the window.open call, but substantially modified the window object with a new prototype declaration.
4:17 pm on Feb 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Alright, Marx, I hear you back there sniggering, "He eschews vehemently! Well, gesundheit, old bean, gesundheit!"

Always one to raise the level of discourse, eh wot?

gph

11:58 pm on Feb 9, 2006 (gmt 0)

10+ Year Member



as I recall the Norton code was actually far more extensive than what has been posted. The program on my machine appended code both to the head and after the closing html tag.

You're right, there is more. The present version dumps the following after </html>

<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;

function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload!= null)
SymRealOnUnload();
}

function SymOnLoad()
{
if(SymRealOnLoad!= null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}

SymRealOnLoad = window.onload;
window.onload = SymOnLoad;

//-->
</script>

I didn't mention that script before because it doesn't do anything of consequence.

gph

5:26 am on Feb 10, 2006 (gmt 0)

10+ Year Member



it doesn't do anything of consequence

I should rephrase that, it doesn't do anything of consequence to stop the use of SymRealWinOpen.
10:14 pm on Feb 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Although I am the beneficiary of a moderately expensive classical education, I cannot recall ever having used the words vehemently or eschew. In fact, I'm not sure about the pronuncation, so I'm not about to try them out even here, alone with my PC.

It is quite likely that my first use of these two words in written form is right before your eyes.

Strange that, innit.

11:26 pm on Feb 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Well, trust me, then: Vehement eschewal is quite an appropriate response vis-a-vis popup windows.
10:48 pm on Feb 13, 2006 (gmt 0)

5+ Year Member



Yeh, this does the job, i didnt know that, as my site has lots of javascript, and this Norton's code make it hard to work.
11:55 pm on Feb 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Outright dismissal
9:33 pm on Feb 16, 2006 (gmt 0)



I have found out a way to put a message to your web page viewers if they are not able to see a javascript on your page because they have some kind of ad blocker including Norton.

First of all. Before your javascript that is not being called add this javascript setting JAVA_FLAG to 0.

SCRIPT language="Javascript">
var JAVA_FLAG = 0;
</SCRIPT>

Next, you will write the code that calls your javascript. Ex:

<SCRIPT language="Javascript" src="yourscript.js">
</SCRIPT>

now somewhere at the top of "yourscript.js" add the code:
JAVA_FLAG = 1;
This will let the following javascript know if yourscript.js was called or not and if the message needs to be displayed. Finally in your file write this javascript:

<script language="Javascript">
if (JAVA_FLAG == 0) // meaning yourscript.js was not loaded
{
if(window.SymError) // If Norton is installed and changing page
{
document.write('You have Norton Internet Security or Norton '+
'Personal Firewall installed on this computer. '+
'If the results do not show up then you need to disable '+
'Ad Blocking in Norton Internet Security and then '+
'refresh this page.<BR><BR> ');
}
else // if Norton not installed but still no yourscript.js
{
document.write('You have a program installed on this computer '+
'that is blocking the javascript for the results on '+
'this page. It is most likely an ad blocking program '+
'that might be part of a security program such as '+
'<FONT COLOR="RED">Norton Internet Security</FONT> or '+
'<FONT COLOR="RED">Norton Personal Firewall</FONT> '+
'You can try disabling the ad blocking program on '+
'your computer and refreshing this page.<BR><BR>');
} // end else
// write below for both errors
document.write('If that does not work you may also have to clear the '+
'Temporary Internet Files cache for your browser. '+
'(Ex: In Internet Explorer, click on "Tools" then '+
'"Internet Options" then "Delete Files" and then '+
'refresh this page.)<BR><BR>');
} // end if

</script>

Let me know if this code has proved useful for you.

9:50 pm on Feb 16, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



A nice idea, yet it might involve one less step if you just set

var yourscript = 1;

inside the linked script. Then you can test for it on the page:

if(this.yourscript){...

===================================

What is

[blue]SymError[/blue]
? I don't have Norton, so I'd like to know more.

1) Is this variable only set to a

true
value when Norton has blocked something?

2) If so, is the variable present - but

false
- when Norton is active but has not yet blocked anything?

ie

alert("SymError" in this) [green]// -> true[/green]
 

Featured Threads

Hot Threads This Week

Hot Threads This Month