js 모음 집 및 설정 홈 페이지 에 추가

<script type="text/javascript">
function AddFavorite(sURL, sTitle)
{
    try
    {
        window.external.addFavorite(sURL, sTitle);
    }
    catch (e)
    {
        try
        {
            window.sidebar.addPanel(sTitle, sURL, "");
        }
        catch (e)
        {
            alert("      ,   Ctrl+D    ");
        }
    }
}

function SetHome(obj,vrl){
        try{
                obj.style.behavior='url(#default#homepage)';obj.setHomePage(vrl);
        }
        catch(e){
                if(window.netscape) {
                        try {
                                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); 
                        } 
                        catch (e) { 
                                alert("         !
'about:config'
[signed.applets.codebase_principal_support] 'true'"); } var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch); prefs.setCharPref('browser.startup.homepage',vrl); } } } </script> <a href="javascript:AddFavorite('http://blog.csdn.net/EI__Nino',' ')" > </a> <a href="javascript:AddFavorite(window.location,document.title)" > </a> <a href="javascript:SetHome(this,window.location)" > </a> <a href="javascript:SetHome('http://blog.csdn.net/EI__Nino')" > </a>

좋은 웹페이지 즐겨찾기