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?

:, , , , ,

3 Comments for this entry

  • keith h

    its a code that enters your vital information stored on your computer. ;P . . . joke

  • the DtTvB

    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
    .

  • snapjack

    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.

Leave a Reply

BHBodeezy.com

I hope you like the site :)

Please enjoy, and let us know if you have any suggestions, feedback or need any help. Thanks!