Möchte gerne um Hilfe bitten, diese Scripte funktionieren bei mir nicht mehr, Vielen Dank im voraus
1 Adressleiste_verschiebbar
Code
(function() {
if (location != 'chrome://browser/content/browser.xhtml')
return;
// Adressleiste verschiebbar
try {
CustomizableUI.createWidget({
id: 'ucjs_urlbar-item',
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
var toolbaritem = aDocument.createXULElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbaritem');
toolbaritem.id = 'ucjs_urlbar-item';
toolbaritem.className = 'chromeclass-toolbar-additional';
toolbaritem.setAttribute('label', 'Adressleiste');
return toolbaritem;
}
});
} catch(e) { };
document.getElementById('ucjs_urlbar-item').appendChild(document.getElementById('urlbar-container'));
// Vor/Zuruck-Schaltflachen verschiebbar
try {
CustomizableUI.createWidget({
id: 'ucjs_back-item',
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
var toolbaritem = aDocument.createXULElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbaritem');
toolbaritem.id = 'ucjs_back-item';
toolbaritem.className = 'chromeclass-toolbar-additional';
toolbaritem.setAttribute('label', 'Zuruck');
return toolbaritem;
}
});
} catch(e) { };
document.getElementById('ucjs_back-item').appendChild(document.getElementById('back-button'));
try {
CustomizableUI.createWidget({
id: 'ucjs_forward-item',
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
var toolbaritem = aDocument.createXULElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbaritem');
toolbaritem.id = 'ucjs_forward-item';
toolbaritem.className = 'chromeclass-toolbar-additional';
toolbaritem.setAttribute('label', 'Vor');
return toolbaritem;
}
});
} catch(e) { };
document.getElementById('ucjs_forward-item').appendChild(document.getElementById('forward-button'));
// Mehr-Werkzeuge-Schaltflache verschiebbar
try {
CustomizableUI.createWidget({
id: 'ucjs_overflow-item',
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
var toolbaritem = aDocument.createXULElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbaritem');
toolbaritem.id = 'ucjs_overflow-item';
toolbaritem.className = 'chromeclass-toolbar-additional';
toolbaritem.setAttribute('label', 'Mehr Werkzeuge');
return toolbaritem;
}
});
} catch(e) { };
document.getElementById('ucjs_overflow-item').appendChild(document.getElementById('nav-bar-overflow-button'));
// Menuleiste verschiebbar
try {
CustomizableUI.createWidget({
id: 'ucjs_menubar-item',
type: 'custom',
defaultArea: CustomizableUI.AREA_MENUBAR,
onBuild: function(aDocument) {
var toolbaritem = aDocument.createXULElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbaritem');
toolbaritem.id = 'ucjs_menubar-item';
toolbaritem.className = 'chromeclass-toolbar-additional';
toolbaritem.setAttribute('label', 'Menuleiste');
return toolbaritem;
}
});
} catch(e) { };
document.getElementById('ucjs_menubar-item').appendChild(document.getElementById('main-menubar'));
})();
Alles anzeigen
2 DownloadSound
Code
var downloadPlaySound = {
// -- config --
DL_DONE : "file:///D:/Разное/Firefox/Sound/Piano.wav",
// -- config --
_list: null,
init: function sampleDownload_init() {
XPCOMUtils.defineLazyModuleGetter(window, "Downloads",
"resource://gre/modules/Downloads.jsm");
//window.removeEventListener("load", this, false);
window.addEventListener("unload", this, false);
//**** Zusätzliche Downloads Überwachung
if (!this._list) {
Downloads.getList(Downloads.ALL).then(list => {
this._list = list;
return this._list.addView(this);
}).then(null, Cu.reportError);
}
},
uninit: function() {
window.removeEventListener("unload", this, false);
if (this._list) {
this._list.removeView(this);
}
},
onDownloadAdded: function (aDownload) {
//**** ダウンロード開始イベント
if (this.DL_START)
this.playSoundFile(this.DL_START);
},
onDownloadChanged: function (aDownload) {
//**** ダウンロードキャンセル
if (aDownload.canceled && this.DL_CANCEL)
this.playSoundFile(this.DL_CANCEL)
//**** ダウンロード失敗
if (aDownload.error && this.DL_FAILED)
this.playSoundFile(this.DL_FAILED)
//**** ダウンロード完了
if (typeof aDownload.downloadPlaySound == "undefined" &&
aDownload.succeeded && aDownload.stopped && this.DL_DONE) {
aDownload.downloadPlaySound = true;
this.playSoundFile(this.DL_DONE);
}
},
playSoundFile: function(aFilePath) {
if (!aFilePath)
return;
var ios = Components.classes["@mozilla.org/network/io-service;1"]
.createInstance(Components.interfaces["nsIIOService"]);
try {
var uri = ios.newURI(aFilePath, "UTF-8", null);
} catch(e) {
return;
}
var file = uri.QueryInterface(Components.interfaces.nsIFileURL).file;
if (!file.exists())
return;
this.play(uri);
},
play: function(aUri) {
var sound = Components.classes["@mozilla.org/sound;1"]
.createInstance(Components.interfaces["nsISound"]);
sound.play(aUri);
},
handleEvent: function(event) {
switch (event.type) {
case "unload":
this.uninit();
break;
}
}
}
downloadPlaySound.init();
Alles anzeigen
3 Google,YouTube Tasten
Code
(function() {
try {
Components.utils.import("resource:///modules/CustomizableUI.jsm");
CustomizableUI.createWidget({
id: "fp-youtube",
defaultArea: CustomizableUI.AREA_NAVBAR,
removable: true,
label: "YouTube",
tooltiptext: "YouTube",
onClick: function() {
openWebLinkIn('https://www.youtube.com/', 'current');
},
onCreated: function(aNode) {
aNode.style.listStyleImage = 'url("https://www.youtube.com/yts/img/favicon-vfl8qSV2F.ico")';
return aNode;
}
});
} catch (e) {
Components.utils.reportError(e);
};
})();
(function() {
try {
Components.utils.import("resource:///modules/CustomizableUI.jsm");
CustomizableUI.createWidget({
id: "fp-google",
defaultArea: CustomizableUI.AREA_NAVBAR,
removable: true,
label: "Google",
tooltiptext: "Google",
onClick: function() {
openWebLinkIn('https://www.google.de/', 'current');
},
onCreated: function(aNode) {
aNode.style.listStyleImage = 'url("https://www.google.de/images/branding/product/ico/googleg_lodp.ico")';
return aNode;
}
});
} catch (e) {
Components.utils.reportError(e);
};
})();
Alles anzeigen
4 ImLesezeichenMenuSpeichern
Code
(function() {
if (location != 'chrome://browser/content/browser.xul')
return;
eval('PlacesCommandHook.bookmarkPage = ' + PlacesCommandHook.bookmarkPage.toString()
.replace(/^async/, 'async function')
.replace(/unfiledGuid/g, 'menuGuid')
);
})();
5 Neustart
Code
(function() {
// Add "Restart" to menu > file
var menuitem = document.createElement('menuitem');
menuitem.id = 'uc_menu_Restart';
menuitem.setAttribute('label' , 'Neustarten');
menuitem.setAttribute('oncommand' , "Services.appinfo.invalidateCachesOnRestart() || BrowserUtils.restartApplication();");
var refItem = document.getElementById('menu_FileQuitItem');
refItem.parentNode.insertBefore(menuitem, refItem);
})();
Alles anzeigen
6 Tastatur
Code
(function () {
if (location != 'chrome://browser/content/browser.xul')
return;
try {
/* ***************************************************************
Pfad zum auszuführenden Programm ODER Ordner definieren:
var APPpath = 'C:\\Windows\\notepad.exe';
var APPpath = 'C:\\Windows\\';
*****************************************************************
Label und Tooltip definieren:
var label = "Notepad";
var tooltiptext = "Notepad starten";
***************************************************************** */
var APPpath = 'C:\\Windows\\System32\\osk.exe';
var label = 'Notepad';
var tooltiptext = 'Notepad starten';
Components.utils.import("resource:///modules/CustomizableUI.jsm");
CustomizableUI.createWidget({
id: "ucjs-" + label + "-button",
defaultArea: CustomizableUI.AREA_NAVBAR,
removable: true,
label: label,
tooltiptext: tooltiptext,
onClick: function () {
var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
file.initWithPath(APPpath);
file.launch();
},
onCreated: function (aNode) {
var ICOpath = APPpath.replace(/\\/g, "//");
aNode.style.listStyleImage = 'url("moz-icon:file:///' + ICOpath + '?size=16")'
return aNode;
}
});
} catch (e) {
Components.utils.reportError(e);
};
})();
Alles anzeigen