Make it your homepage

Probably you have seen  links in web pages to make page as your homepage. Using javascript you can achieve that. Here is the script,

    function setHomepage()
    {
        if (document.all)
        {
            document.body.style.behavior=’url(#default#homepage)’;
            document.body.setHomePage(‘https://ekduitin.wordpress.com’);
    
        }
        else if (window.sidebar)
        {
            if(window.netscape)
            {
             try
             { 
                netscape.security.PrivilegeManager.enablePrivilege(“UniversalXPConnect”); 
                var prefs = Components.classes[‘@mozilla.org/preferences-service;1’].getService(Components. interfaces.nsIPrefBranch);
                prefs.setCharPref(‘browser.startup.homepage’,’https://ekduitin.wordpress.com’);
             } 
             catch(e)
             { 
                alert(“this action was aviod by your browser,if you want to enable,\nplease enter about:config in your address line,and change the value of\nsigned.applets.codebase_principal_support to true”); 
             }
            }
        }
    }

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s