// JavaScript Document // Add to favorites add function AddFavorite (sURL, sTitle) {try {window. external. addFavorite (sURL, sTitle);} catch (e) {try {window. sidebar. addPanel (sTitle, sURL, "") ;}catch (e) {alert ("failed to add to favorites, please add with Ctrl + D ");}}} // set it as the homepage function SetHome (obj, vrl) {try {obj. style. behavior = 'url (# default # homepage) '; obj. setHomePage (vrl);} catch (e) {if (window. netscape) {try {netscape. security. pri VilegeManager. enablePrivilege ("UniversalXPConnect");} catch (e) {alert ("this operation was rejected by the browser! \ N enter "about: config" in the address bar of the browser, press enter \ n, set the value of [signed. applets. codebase_principal_support] To 'true', and double-click it. ");} Var prefs = Components. classes ['@ resolve (Components. interfaces. nsIPrefBranch); prefs. setCharPref ('browser. startup. homepage', vrl );}}}
Use
Set as Homepage
Add to favorites