var browserName=navigator.appName;
var browserVer=parseInt(navigator.appVersion);
var popsMode;
if (browserName=="Netscape" && browserVer>=5) {
alert(browserName);
alert(browserVer);
popsMode=true;
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
if (prefs.getPrefType("dom.disable_window_open_feature.resizable") == prefs.PREF_BOOL){
popsMode = prefs.getBoolPref("dom.disable_window_open_feature.resizable");
}
if (popsMode==true) {
prefs.setBoolPref("dom.disable_window_open_feature.resizable",false);
alert(popsMode);
}
}
2 comments:
When i run this code as a function on page load.
Following line is not executing and java script is not running
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
How can i run complete java script.
It supported in Mozilla and netscape browser only.
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
Post a Comment