Can you explain the following javascript code to me? I see it in the source code of may websites.?
by admin on Jul.28, 2010, under Javascript
Here is the first script.
The second script:
What does these codes do?
Why do so many sites have this code?


July 28th, 2010 on 11:06 pm
its a code that enters your vital information stored on your computer. ;P . . . joke
July 28th, 2010 on 11:30 pm
Looks like it makes window.open broken
while the page is loading, and disable it again
when you leave that page.
Don’t worry, it’s a page-wide script.
function SymError()
{
return true;
}
window.onerror = SymError;
– This should bypass all the errors on this page.
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
– This will make window.open do nothing, until the page
– is loaded. This function will be broken again when
– you try to exit the page.
==============================
var SymRealOnLoad;
var SymRealOnUnload;
function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}
– Disable the opening of any window when exiting the page.
function SymOnLoad()
{
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}
SymRealOnLoad = window.onload;
window.onload = SymOnLoad;
– When the document sucessfully downloaded,
– re-enable window.open
the DtTvB
.
July 28th, 2010 on 11:34 pm
It doesnt come from web sites. It must be your Norton Security adding that piece of code into the webpages as they are being downloaded. I guess it is the code used to block pop-ups.