Diff
checker
テキスト
テキスト
画像
ドキュメント
Excel
フォルダ
Legal
Enterprise
デスクトップ
料金
ログイン
Diffchecker デスクトップのダウンロード
テキスト比較
2 つのテキスト ファイルの違いを見つける
ツール
履歴
ライブエディター
未変更行を折りたたむ
折り返しなし
レイアウト
分割
統合
比較精度
スマート
単語
文字
シンタックスハイライト
構文を選択
無視
テキスト変換
最初の差分へ移動
入力を編集
Diffchecker Desktop
Diffcheckerを実行する最も安全な方法。Diffchecker Desktopアプリを入手:あなたの差分はコンピューターから出ることはありません!
Desktopを入手
Untitled diff
作成日
11 年前
差分は期限切れになりません
クリア
エクスポート
共有
説明
2 削除
行
合計
削除
文字
合計
削除
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
165 行
すべてコピー
66 追加
行
合計
追加
文字
合計
追加
この機能を引き続き使用するには、アップグレードしてください
Diff
checker
Pro
価格を見る
225 行
すべてコピー
var gpoFox = {
var gpoFox = {
basePath : "",
basePath : "",
//basePathLocked : "",
//basePathLocked : "",
defaultPath : "",
defaultPath : "",
lockedPath : "",
lockedPath : "",
reg : "",
reg : "",
prefService : "",
prefService : "",
updateDisabled : false,
updateDisabled : false,
//Disable Update button in Help menu
//Disable Update button in Help menu
disableUpdates : function(){
disableUpdates : function(){
if(gpoFox.updateDisabled){
if(gpoFox.updateDisabled){
var name = document.getElementById("checkForUpdates");
var name = document.getElementById("checkForUpdates");
name.disabled = true;
name.disabled = true;
}
}
},
},
//Read value from registry
//Read value from registry
readRegistryValue : function(value){
readRegistryValue : function(value){
switch (gpoFox.reg.getValueType(value)) {
switch (gpoFox.reg.getValueType(value)) {
case gpoFox.reg.TYPE_STRING:
case gpoFox.reg.TYPE_STRING:
return gpoFox.reg.readStringValue(value);
return gpoFox.reg.readStringValue(value);
case gpoFox.reg.TYPE_BINARY:
case gpoFox.reg.TYPE_BINARY:
return gpoFox.reg.readBinaryValue(value);
return gpoFox.reg.readBinaryValue(value);
case gpoFox.reg.TYPE_INT:
case gpoFox.reg.TYPE_INT:
return gpoFox.reg.readIntValue(value);
return gpoFox.reg.readIntValue(value);
case gpoFox.reg.TYPE_INT64:
case gpoFox.reg.TYPE_INT64:
return gpoFox.reg.readInt64Value(value);
return gpoFox.reg.readInt64Value(value);
}
}
// unknown type
// unknown type
return null;
return null;
},
},
//write value to FF preferences
//write value to FF preferences
writePrefValue : function(name,value,locked){
writePrefValue : function(name,value,locked){
if(locked){
if(locked){
return gpoFox.writeLockedPrefValue(name,value);
return gpoFox.writeLockedPrefValue(name,value);
}else{
}else{
return gpoFox.writeUserPrefValue(name,value);
return gpoFox.writeUserPrefValue(name,value);
}
}
return null;
return null;
},
},
//for writing a locked pref
//for writing a locked pref
writeLockedPrefValue : function(name,value){
writeLockedPrefValue : function(name,value){
var prefBranch = gpoFox.prefService.getDefaultBranch(name);
var prefBranch = gpoFox.prefService.getDefaultBranch(name);
switch (prefBranch.getPrefType("")) {
switch (prefBranch.getPrefType("")) {
case prefBranch.PREF_STRING:
case prefBranch.PREF_STRING:
prefBranch.setCharPref("", value);
prefBranch.setCharPref("", value);
prefBranch.lockPref("");
prefBranch.lockPref("");
return true;
return true;
case prefBranch.PREF_INT:
case prefBranch.PREF_INT:
prefBranch.setIntPref("", value);
prefBranch.setIntPref("", value);
prefBranch.lockPref("");
prefBranch.lockPref("");
return true;
return true;
case prefBranch.PREF_BOOL:
case prefBranch.PREF_BOOL:
if(name=="app.update.enabled" && value==false){
if(name=="app.update.enabled" && value==false){
gpoFox.updateDisabled=true;
gpoFox.updateDisabled=true;
}
}
コピー
コピー済み
コピー
コピー済み
prefBranch.setBoolPref("",
value
);
if ( value == "false" ){
prefBranch.setBoolPref("",
false);
}else{
prefBranch.setBoolPref("", true
);
}
prefBranch.lockPref("");
prefBranch.lockPref("");
return true;
return true;
コピー
コピー済み
コピー
コピー済み
default:
switch(gpoFox.getLocalType(value))
{
case "string":
if ( value == "false" ){
prefBranch.setBoolPref("", false);
}else{
prefBranch.setBoolPref("", true);
}
return true;
case "int":
prefBranch.setIntPref("", value);
return true;
case "bool":
prefBranch.setBoolPref("", false);
return true;
default:
return false;
}
}
}
return null;
return null;
},
},
//for writing a user pref
//for writing a user pref
writeUserPrefValue : function(name,value){
writeUserPrefValue : function(name,value){
var prefBranch = gpoFox.prefService.getBranch(name);
var prefBranch = gpoFox.prefService.getBranch(name);
switch (prefBranch.getPrefType("")) {
switch (prefBranch.getPrefType("")) {
case prefBranch.PREF_STRING:
case prefBranch.PREF_STRING:
prefBranch.setCharPref("", value);
prefBranch.setCharPref("", value);
return true;
return true;
case prefBranch.PREF_INT:
case prefBranch.PREF_INT:
prefBranch.setIntPref("", value);
prefBranch.setIntPref("", value);
return true;
return true;
case prefBranch.PREF_BOOL:
case prefBranch.PREF_BOOL:
コピー
コピー済み
コピー
コピー済み
prefBranch.setBoolPref("",
value
);
if ( value == "false" ){
prefBranch.setBoolPref("",
false);
}else{
prefBranch.setBoolPref("", true
);
}
return true;
return true;
コピー
コピー済み
コピー
コピー済み
default:
switch(gpoFox.getLocalType(value))
{
case "string":
prefBranch.setCharPref("", value);
return true;
case "int":
prefBranch.setIntPref("", value);
return true;
case "bool":
if ( value == "false" ){
prefBranch.setBoolPref("", false);
}else{
prefBranch.setBoolPref("", true);
}
return true;
default:
return false;
}
}
}
return null;
return null;
},
},
//Set a FF preference
//Set a FF preference
//will call setLockPref or setUserPref depending on if locked is set to true or false
//will call setLockPref or setUserPref depending on if locked is set to true or false
setPref : function(type,locked){
setPref : function(type,locked){
if(locked){
if(locked){
gpoFox.setLockPref(type);
gpoFox.setLockPref(type);
}
}
else{
else{
gpoFox.setUserPref(type);
gpoFox.setUserPref(type);
}
}
},
},
//set a FF locked preference
//set a FF locked preference
setLockPref : function(type){
setLockPref : function(type){
gpoFox.reg.open(type,gpoFox.basePath + "\\" + gpoFox.lockedPath,gpoFox.reg.ACCESS_READ);
gpoFox.reg.open(type,gpoFox.basePath + "\\" + gpoFox.lockedPath,gpoFox.reg.ACCESS_READ);
for (var i = 0; i < gpoFox.reg.valueCount; i++)
for (var i = 0; i < gpoFox.reg.valueCount; i++)
{
{
var prefName = gpoFox.reg.getValueName(i);
var prefName = gpoFox.reg.getValueName(i);
var FirefoxSetter = gpoFox.readRegistryValue(prefName);
var FirefoxSetter = gpoFox.readRegistryValue(prefName);
gpoFox.writePrefValue(prefName,FirefoxSetter,true);
gpoFox.writePrefValue(prefName,FirefoxSetter,true);
}
}
gpoFox.reg.close();
gpoFox.reg.close();
},
},
//set a FF user preference
//set a FF user preference
setUserPref : function(type){
setUserPref : function(type){
gpoFox.reg.open(type,gpoFox.basePath + "\\" + gpoFox.defaultPath,gpoFox.reg.ACCESS_READ);
gpoFox.reg.open(type,gpoFox.basePath + "\\" + gpoFox.defaultPath,gpoFox.reg.ACCESS_READ);
for (var i = 0; i < gpoFox.reg.valueCount; i++)
for (var i = 0; i < gpoFox.reg.valueCount; i++)
{
{
var prefName = gpoFox.reg.getValueName(i);
var prefName = gpoFox.reg.getValueName(i);
var FirefoxSetter = gpoFox.readRegistryValue(prefName);
var FirefoxSetter = gpoFox.readRegistryValue(prefName);
gpoFox.writePrefValue(prefName,FirefoxSetter,false);
gpoFox.writePrefValue(prefName,FirefoxSetter,false);
}
}
gpoFox.reg.close();
gpoFox.reg.close();
},
},
コピー
コピー済み
コピー
コピー済み
getLocalType : function(value){
var returnValue = "string";
if ( value == "true" || value == "false" ){
return "bool"
}else{
try{
if (value > -1 ){
return "int"
}
}catch(ex){}
}
return returnValue;
},
//Main function
//Main function
gpofirefox : function(){
gpofirefox : function(){
try {
try {
//set locked preferences from computer GPO
//set locked preferences from computer GPO
gpoFox.reg.open(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,gpoFox.basePath,gpoFox.reg.ACCESS_READ);
gpoFox.reg.open(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,gpoFox.basePath,gpoFox.reg.ACCESS_READ);
if(gpoFox.reg.hasChild(gpoFox.lockedPath)){
if(gpoFox.reg.hasChild(gpoFox.lockedPath)){
gpoFox.setPref(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,true);
gpoFox.setPref(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,true);
}
}
//set user preferences from computer GPO
//set user preferences from computer GPO
gpoFox.reg.open(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,gpoFox.basePath,gpoFox.reg.ACCESS_READ);
gpoFox.reg.open(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,gpoFox.basePath,gpoFox.reg.ACCESS_READ);
if(gpoFox.reg.hasChild(gpoFox.defaultPath)){
if(gpoFox.reg.hasChild(gpoFox.defaultPath)){
gpoFox.setPref(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,false);
gpoFox.setPref(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,false);
}
}
//set locked preferences from user GPO
//set locked preferences from user GPO
gpoFox.reg.open(gpoFox.reg.ROOT_KEY_CURRENT_USER,gpoFox.basePath,gpoFox.reg.ACCESS_READ);
gpoFox.reg.open(gpoFox.reg.ROOT_KEY_CURRENT_USER,gpoFox.basePath,gpoFox.reg.ACCESS_READ);
if(gpoFox.reg.hasChild(gpoFox.lockedPath)){
if(gpoFox.reg.hasChild(gpoFox.lockedPath)){
gpoFox.setPref(gpoFox.reg.ROOT_KEY_CURRENT_USER,true);
gpoFox.setPref(gpoFox.reg.ROOT_KEY_CURRENT_USER,true);
}
}
//set user preferences from user GPO
//set user preferences from user GPO
gpoFox.reg.open(gpoFox.reg.ROOT_KEY_CURRENT_USER,gpoFox.basePath,gpoFox.reg.ACCESS_READ);
gpoFox.reg.open(gpoFox.reg.ROOT_KEY_CURRENT_USER,gpoFox.basePath,gpoFox.reg.ACCESS_READ);
if(gpoFox.reg.hasChild(gpoFox.defaultPath)){
if(gpoFox.reg.hasChild(gpoFox.defaultPath)){
gpoFox.setPref(gpoFox.reg.ROOT_KEY_CURRENT_USER,false);
gpoFox.setPref(gpoFox.reg.ROOT_KEY_CURRENT_USER,false);
}
}
}catch(ex){}
}catch(ex){}
},
},
onLoad : function(){
onLoad : function(){
//Define path where to read registry
//Define path where to read registry
this.basePath = "Software\\Policies";
this.basePath = "Software\\Policies";
this.defaultPath = "Mozilla\\defaultPref";
this.defaultPath = "Mozilla\\defaultPref";
this.lockedPath = "Mozilla\\lockPref";
this.lockedPath = "Mozilla\\lockPref";
//load XPCOM component to read registry
//load XPCOM component to read registry
this.reg = Components.classes["@mozilla.org/windows-registry-key;1"].createInstance(Components.interfaces.nsIWindowsRegKey);
this.reg = Components.classes["@mozilla.org/windows-registry-key;1"].createInstance(Components.interfaces.nsIWindowsRegKey);
//load XPCOM component to read and write preferences
//load XPCOM component to read and write preferences
this.prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
this.prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService);
var helpMenu = document.getElementById("menu_HelpPopup");
var helpMenu = document.getElementById("menu_HelpPopup");
if (helpMenu)
if (helpMenu)
helpMenu.addEventListener("popupshowing", gpoFox.disableUpdates, false);
helpMenu.addEventListener("popupshowing", gpoFox.disableUpdates, false);
this.gpofirefox();
this.gpofirefox();
return;
return;
}
}
};
};
window.addEventListener("load",function(e){gpoFox.onLoad(e);},false);
window.addEventListener("load",function(e){gpoFox.onLoad(e);},false);
保存された差分
原文
ファイルを開く
var gpoFox = { basePath : "", //basePathLocked : "", defaultPath : "", lockedPath : "", reg : "", prefService : "", updateDisabled : false, //Disable Update button in Help menu disableUpdates : function(){ if(gpoFox.updateDisabled){ var name = document.getElementById("checkForUpdates"); name.disabled = true; } }, //Read value from registry readRegistryValue : function(value){ switch (gpoFox.reg.getValueType(value)) { case gpoFox.reg.TYPE_STRING: return gpoFox.reg.readStringValue(value); case gpoFox.reg.TYPE_BINARY: return gpoFox.reg.readBinaryValue(value); case gpoFox.reg.TYPE_INT: return gpoFox.reg.readIntValue(value); case gpoFox.reg.TYPE_INT64: return gpoFox.reg.readInt64Value(value); } // unknown type return null; }, //write value to FF preferences writePrefValue : function(name,value,locked){ if(locked){ return gpoFox.writeLockedPrefValue(name,value); }else{ return gpoFox.writeUserPrefValue(name,value); } return null; }, //for writing a locked pref writeLockedPrefValue : function(name,value){ var prefBranch = gpoFox.prefService.getDefaultBranch(name); switch (prefBranch.getPrefType("")) { case prefBranch.PREF_STRING: prefBranch.setCharPref("", value); prefBranch.lockPref(""); return true; case prefBranch.PREF_INT: prefBranch.setIntPref("", value); prefBranch.lockPref(""); return true; case prefBranch.PREF_BOOL: if(name=="app.update.enabled" && value==false){ gpoFox.updateDisabled=true; } prefBranch.setBoolPref("", value); prefBranch.lockPref(""); return true; } return null; }, //for writing a user pref writeUserPrefValue : function(name,value){ var prefBranch = gpoFox.prefService.getBranch(name); switch (prefBranch.getPrefType("")) { case prefBranch.PREF_STRING: prefBranch.setCharPref("", value); return true; case prefBranch.PREF_INT: prefBranch.setIntPref("", value); return true; case prefBranch.PREF_BOOL: prefBranch.setBoolPref("", value); return true; } return null; }, //Set a FF preference //will call setLockPref or setUserPref depending on if locked is set to true or false setPref : function(type,locked){ if(locked){ gpoFox.setLockPref(type); } else{ gpoFox.setUserPref(type); } }, //set a FF locked preference setLockPref : function(type){ gpoFox.reg.open(type,gpoFox.basePath + "\\" + gpoFox.lockedPath,gpoFox.reg.ACCESS_READ); for (var i = 0; i < gpoFox.reg.valueCount; i++) { var prefName = gpoFox.reg.getValueName(i); var FirefoxSetter = gpoFox.readRegistryValue(prefName); gpoFox.writePrefValue(prefName,FirefoxSetter,true); } gpoFox.reg.close(); }, //set a FF user preference setUserPref : function(type){ gpoFox.reg.open(type,gpoFox.basePath + "\\" + gpoFox.defaultPath,gpoFox.reg.ACCESS_READ); for (var i = 0; i < gpoFox.reg.valueCount; i++) { var prefName = gpoFox.reg.getValueName(i); var FirefoxSetter = gpoFox.readRegistryValue(prefName); gpoFox.writePrefValue(prefName,FirefoxSetter,false); } gpoFox.reg.close(); }, //Main function gpofirefox : function(){ try { //set locked preferences from computer GPO gpoFox.reg.open(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,gpoFox.basePath,gpoFox.reg.ACCESS_READ); if(gpoFox.reg.hasChild(gpoFox.lockedPath)){ gpoFox.setPref(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,true); } //set user preferences from computer GPO gpoFox.reg.open(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,gpoFox.basePath,gpoFox.reg.ACCESS_READ); if(gpoFox.reg.hasChild(gpoFox.defaultPath)){ gpoFox.setPref(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,false); } //set locked preferences from user GPO gpoFox.reg.open(gpoFox.reg.ROOT_KEY_CURRENT_USER,gpoFox.basePath,gpoFox.reg.ACCESS_READ); if(gpoFox.reg.hasChild(gpoFox.lockedPath)){ gpoFox.setPref(gpoFox.reg.ROOT_KEY_CURRENT_USER,true); } //set user preferences from user GPO gpoFox.reg.open(gpoFox.reg.ROOT_KEY_CURRENT_USER,gpoFox.basePath,gpoFox.reg.ACCESS_READ); if(gpoFox.reg.hasChild(gpoFox.defaultPath)){ gpoFox.setPref(gpoFox.reg.ROOT_KEY_CURRENT_USER,false); } }catch(ex){} }, onLoad : function(){ //Define path where to read registry this.basePath = "Software\\Policies"; this.defaultPath = "Mozilla\\defaultPref"; this.lockedPath = "Mozilla\\lockPref"; //load XPCOM component to read registry this.reg = Components.classes["@mozilla.org/windows-registry-key;1"].createInstance(Components.interfaces.nsIWindowsRegKey); //load XPCOM component to read and write preferences this.prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); var helpMenu = document.getElementById("menu_HelpPopup"); if (helpMenu) helpMenu.addEventListener("popupshowing", gpoFox.disableUpdates, false); this.gpofirefox(); return; } }; window.addEventListener("load",function(e){gpoFox.onLoad(e);},false);
変更されたテキスト
ファイルを開く
var gpoFox = { basePath : "", //basePathLocked : "", defaultPath : "", lockedPath : "", reg : "", prefService : "", updateDisabled : false, //Disable Update button in Help menu disableUpdates : function(){ if(gpoFox.updateDisabled){ var name = document.getElementById("checkForUpdates"); name.disabled = true; } }, //Read value from registry readRegistryValue : function(value){ switch (gpoFox.reg.getValueType(value)) { case gpoFox.reg.TYPE_STRING: return gpoFox.reg.readStringValue(value); case gpoFox.reg.TYPE_BINARY: return gpoFox.reg.readBinaryValue(value); case gpoFox.reg.TYPE_INT: return gpoFox.reg.readIntValue(value); case gpoFox.reg.TYPE_INT64: return gpoFox.reg.readInt64Value(value); } // unknown type return null; }, //write value to FF preferences writePrefValue : function(name,value,locked){ if(locked){ return gpoFox.writeLockedPrefValue(name,value); }else{ return gpoFox.writeUserPrefValue(name,value); } return null; }, //for writing a locked pref writeLockedPrefValue : function(name,value){ var prefBranch = gpoFox.prefService.getDefaultBranch(name); switch (prefBranch.getPrefType("")) { case prefBranch.PREF_STRING: prefBranch.setCharPref("", value); prefBranch.lockPref(""); return true; case prefBranch.PREF_INT: prefBranch.setIntPref("", value); prefBranch.lockPref(""); return true; case prefBranch.PREF_BOOL: if(name=="app.update.enabled" && value==false){ gpoFox.updateDisabled=true; } if ( value == "false" ){ prefBranch.setBoolPref("", false); }else{ prefBranch.setBoolPref("", true); } prefBranch.lockPref(""); return true; default: switch(gpoFox.getLocalType(value)) { case "string": if ( value == "false" ){ prefBranch.setBoolPref("", false); }else{ prefBranch.setBoolPref("", true); } return true; case "int": prefBranch.setIntPref("", value); return true; case "bool": prefBranch.setBoolPref("", false); return true; default: return false; } } return null; }, //for writing a user pref writeUserPrefValue : function(name,value){ var prefBranch = gpoFox.prefService.getBranch(name); switch (prefBranch.getPrefType("")) { case prefBranch.PREF_STRING: prefBranch.setCharPref("", value); return true; case prefBranch.PREF_INT: prefBranch.setIntPref("", value); return true; case prefBranch.PREF_BOOL: if ( value == "false" ){ prefBranch.setBoolPref("", false); }else{ prefBranch.setBoolPref("", true); } return true; default: switch(gpoFox.getLocalType(value)) { case "string": prefBranch.setCharPref("", value); return true; case "int": prefBranch.setIntPref("", value); return true; case "bool": if ( value == "false" ){ prefBranch.setBoolPref("", false); }else{ prefBranch.setBoolPref("", true); } return true; default: return false; } } return null; }, //Set a FF preference //will call setLockPref or setUserPref depending on if locked is set to true or false setPref : function(type,locked){ if(locked){ gpoFox.setLockPref(type); } else{ gpoFox.setUserPref(type); } }, //set a FF locked preference setLockPref : function(type){ gpoFox.reg.open(type,gpoFox.basePath + "\\" + gpoFox.lockedPath,gpoFox.reg.ACCESS_READ); for (var i = 0; i < gpoFox.reg.valueCount; i++) { var prefName = gpoFox.reg.getValueName(i); var FirefoxSetter = gpoFox.readRegistryValue(prefName); gpoFox.writePrefValue(prefName,FirefoxSetter,true); } gpoFox.reg.close(); }, //set a FF user preference setUserPref : function(type){ gpoFox.reg.open(type,gpoFox.basePath + "\\" + gpoFox.defaultPath,gpoFox.reg.ACCESS_READ); for (var i = 0; i < gpoFox.reg.valueCount; i++) { var prefName = gpoFox.reg.getValueName(i); var FirefoxSetter = gpoFox.readRegistryValue(prefName); gpoFox.writePrefValue(prefName,FirefoxSetter,false); } gpoFox.reg.close(); }, getLocalType : function(value){ var returnValue = "string"; if ( value == "true" || value == "false" ){ return "bool" }else{ try{ if (value > -1 ){ return "int" } }catch(ex){} } return returnValue; }, //Main function gpofirefox : function(){ try { //set locked preferences from computer GPO gpoFox.reg.open(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,gpoFox.basePath,gpoFox.reg.ACCESS_READ); if(gpoFox.reg.hasChild(gpoFox.lockedPath)){ gpoFox.setPref(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,true); } //set user preferences from computer GPO gpoFox.reg.open(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,gpoFox.basePath,gpoFox.reg.ACCESS_READ); if(gpoFox.reg.hasChild(gpoFox.defaultPath)){ gpoFox.setPref(gpoFox.reg.ROOT_KEY_LOCAL_MACHINE,false); } //set locked preferences from user GPO gpoFox.reg.open(gpoFox.reg.ROOT_KEY_CURRENT_USER,gpoFox.basePath,gpoFox.reg.ACCESS_READ); if(gpoFox.reg.hasChild(gpoFox.lockedPath)){ gpoFox.setPref(gpoFox.reg.ROOT_KEY_CURRENT_USER,true); } //set user preferences from user GPO gpoFox.reg.open(gpoFox.reg.ROOT_KEY_CURRENT_USER,gpoFox.basePath,gpoFox.reg.ACCESS_READ); if(gpoFox.reg.hasChild(gpoFox.defaultPath)){ gpoFox.setPref(gpoFox.reg.ROOT_KEY_CURRENT_USER,false); } }catch(ex){} }, onLoad : function(){ //Define path where to read registry this.basePath = "Software\\Policies"; this.defaultPath = "Mozilla\\defaultPref"; this.lockedPath = "Mozilla\\lockPref"; //load XPCOM component to read registry this.reg = Components.classes["@mozilla.org/windows-registry-key;1"].createInstance(Components.interfaces.nsIWindowsRegKey); //load XPCOM component to read and write preferences this.prefService = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefService); var helpMenu = document.getElementById("menu_HelpPopup"); if (helpMenu) helpMenu.addEventListener("popupshowing", gpoFox.disableUpdates, false); this.gpofirefox(); return; } }; window.addEventListener("load",function(e){gpoFox.onLoad(e);},false);
違いを見つける