So ich habe jetzt alles aus dem Chromeordner im Nightly Profil gelöscht und der Reihe nach alles wieder rein kopiert.
Jetzt funktioniert es.
Warum?
Gruß
EDV-Oldi
So ich habe jetzt alles aus dem Chromeordner im Nightly Profil gelöscht und der Reihe nach alles wieder rein kopiert.
Jetzt funktioniert es.
Warum?
Gruß
EDV-Oldi
Der Skriptcache?
Ja, das mache ich immer mit dem Script RestartFirefox
Hast du deine Version deaktiviert und den Skript-Cache geleert?
Ich habe meine Version überschrieben und der Cache wird bei mir immer gelöscht beim Neustart vom Firefox.
Gruß
EDV-Oldi
Diese Meldung erscheint im Download Fenster:
Die Dateien unter jar:file:///D:/Mozilla/Programme/Firefox-Central/firefox/browser/omni.ja!/chrome/browser/content/browser/downloads/contentAreaDownloadsView.xul konnten nicht gefunden werden.
Im Script von Endor gibt es aber keine AreaDownloadsView.xul mehr.
Gruß
EDV-Oldi
leider funktionieren Deine Dateien bei mir auch nicht.
Gruß
EDV-Oldi
In Zeile 186 des Skriptes steht bei dir noch .xul.
ich habe aber auch geschrieben
Auch wenn ich im Script ändere auf AreaDownloadsView.xhtml
kommt der selbe Fehler
Also hier funktioniert das Script im aktuellen Nightly.
Jetzt nur die Frage habe wir das selbe?
// ==UserScript==
// @name ucjsDownloadsStatusModoki.uc.js
// @namespace http://space.geocities.yahoo.co.jp/gl/alice0775
// @description Downloads Status Modoki
// @include main
// @compatibility Firefox 73+
// @author Alice0775
// @note ucjsDownloadsStatusModoki.uc.js.css muss über die userChrome.css Datei geladen werden
// @version 2019/10/20 12:30 workaround Bug 1497200: Apply Meta CSP to about:downloads, Bug 1513325 - Remove textbox binding
// @version 2019/09/08 19:30 fix scrollbox
// @version 2019/05/21 08:30 fix 69.0a1 Bug 1551320 - Replace all createElement calls in XUL documents with createXULElement
// @version 2018/10/27 12:00 fix for 64+
// @version 2018/06/12 21:00 fix for private window mode
// @version 2018/06/07 12:00 fix file name for history
// @version 2018/02/10 12:00 try catch error when DO_NOT_DELETE_HISTORY = true
// @version 2017/12/10 12:00 fix error when DO_NOT_DELETE_HISTORY = true
// @version 2017/12/10 12:00 remove workaround Bug 1279329. Disable btn while clear list is doing, close button styling for 57.
// @version 2016/06/10 12:00 modify style independent of font-family
// @version 2016/06/10 07:00 modify style of close button, fix typo
// @version 2016/06/10 00:00 Workaround Bug 1279329. adjust some padding
// @version 2015/05/08 00:00 remove padding due to Bug 1160734
// @version 2014/03/31 00:00 fix for browser.download.manager.showWhenStarting
// @version 2013/12/22 13:00 chromehidden
// @version 2013/12/19 17:10 rename REMEMBERHISTOTY to DO_NOT_DELETE_HISTORY
// @version 2013/12/16 23:28 fixed initialize numDls
// @version 2013/12/16 23:24 open only download added
// @version 2013/12/16 23:10 open only download started
// @version 2013/12/16 21:20 modify css Windows7 Aero
// @version 2013/12/16 21:00 modify css
// @version 2013/12/16 19:30 add autocheck false
// @version 2013/12/16 18:31 fix pref name
// @version 2013/12/16 18:30
// @note
// ==/UserScript==
var ucjsDownloadsStatusModoki = {
_summary: null,
_list: null,
get downloadsStatusModokiBar() {
delete downloadsStatusModokiBar;
return this.downloadsStatusModokiBar = document.getElementById("downloadsStatusModokiBar");
},
get toggleMenuitem() {
delete toggleMenuitem;
return this.toggleMenuitem = document.getElementById("toggle_downloadsStatusModokiBar");
},
init: function() {
if (document.documentElement.getAttribute("chromehidden") !="" )
return;
XPCOMUtils.defineLazyModuleGetter(window, "Downloads",
"resource://gre/modules/Downloads.jsm");
var style = `
@namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);
#ucjsDownloadsStatusModoki {
width: 100%;
max-height: 100px;
height: 39px;
}
`.replace(/\s+/g, " ");
var sspi = document.createProcessingInstruction(
'xml-stylesheet',
'type="text/css" href="data:text/css,' + encodeURIComponent(style) + '"'
);
document.insertBefore(sspi, document.documentElement);
sspi.getAttribute = function(name) {
return document.documentElement.getAttribute(name);
};
var toolbar = document.createXULElement("vbox");
toolbar.setAttribute("id", "downloadsStatusModokiBar");
toolbar.setAttribute("collapsed", true);
var bottombox = document.getElementById("browser-bottombox");
bottombox.appendChild(toolbar);
var browser = toolbar.appendChild(document.createXULElement("browser"));
browser.setAttribute("disablehistory", true);
browser.setAttribute("remote", false);
browser.setAttribute("id", "ucjsDownloadsStatusModoki");
browser.addEventListener("load", function(event){ucjsDownloadsStatusModoki.onload(event)}, true);
browser.setAttribute("src", "chrome://browser/content/downloads/contentAreaDownloadsView.xhtml?StatusModoki");
var menuitem = document.createXULElement("menuitem");
menuitem.setAttribute("id", "toggle_downloadsStatusModokiBar");
menuitem.setAttribute("type", "checkbox");
menuitem.setAttribute("autocheck", false);
menuitem.setAttribute("label", "Download Leiste");
menuitem.setAttribute("checked", false);
menuitem.setAttribute("accesskey", "D");
menuitem.setAttribute("oncommand", "ucjsDownloadsStatusModoki.toggleDownloadsStatusModokiBar()");
var ref = document.getElementById("menu_customizeToolbars");
ref.parentNode.insertBefore(menuitem, ref.previousSibling);
// Ensure that the DownloadSummary object will be created asynchronously.
if (!this._summary) {
Downloads.getSummary(Downloads.ALL).then(summary => {
this._summary = summary;
return this._summary.addView(this);
}).then(null, Cu.reportError);
}
if (!this._list) {
Downloads.getList(Downloads.ALL).then(list => {
this._list = list;
return this._list.addView(this);
}).then(null, Cu.reportError);
}
window.addEventListener("unload", this, false);
},
uninit: function() {
window.removeEventListener("unload", this, false);
if (this._summary) {
this._summary.removeView(this);
}
if (this._list) {
this._list.removeView(this);
}
},
handleEvent: function(event) {
switch (event.type) {
case "unload":
this.uninit();
break;
}
},
toggleDownloadsStatusModokiBar: function() {
var collapsed = this.downloadsStatusModokiBar.collapsed;
this.downloadsStatusModokiBar.collapsed = !collapsed;
this.toggleMenuitem.setAttribute("checked", collapsed);
},
openDownloadsStatusModoki: function() {
this.downloadsStatusModokiBar.collapsed = false;
this.toggleMenuitem.setAttribute("checked", true);
},
hideDownloadsStatusModoki: function() {
this.downloadsStatusModokiBar.collapsed = true;
this.toggleMenuitem.setAttribute("checked", false);
},
onDownloadAdded: function (aDownload) {
Cu.import("resource://gre/modules/Services.jsm");
var showWhenStarting = true;
try {
showWhenStarting = Services.prefs.getBoolPref("userChrome.downloadsStatusModoki.showWhenStarting");
} catch(e) {}
this.numDls = 0;
if (showWhenStarting) {
if (this._list) {
this._list.getAll().then(downloads => {
for (let download of downloads) {
if (!download.stopped)
this.numDls++;
}
if (this.numDls > 0)
this.openDownloadsStatusModoki(false);
}).then(null, Cu.reportError);
}
}
},
onSummaryChanged: function () {
Cu.import("resource://gre/modules/Services.jsm");
if (!this._summary)
return;
if (this._summary.allHaveStopped || this._summary.progressTotalBytes == 0) {
var closeWhenDone = false;
try {
closeWhenDone = Services.prefs.getBoolPref("userChrome.downloadsStatusModoki.closeWhenDone");
} catch(e) {}
if (closeWhenDone) {
this.hideDownloadsStatusModoki();
}
}
},
// chrome://browser/content/downloads/contentAreaDownloadsView.xul
onload: function(event) {
var doc = event.originalTarget;
var win = doc.defaultView;
doc.documentElement.setAttribute("ucjsDownloadsStatusModoki", "true");
var button = doc.createXULElement("button");
button.setAttribute("label", "Löschen");
button.setAttribute("id", "ucjs_clearListButton");
button.setAttribute("accesskey", "L");
var ref = doc.getElementById("downloadCommands");
var vbox = doc.createXULElement("vbox");
var box = vbox.appendChild(doc.createXULElement("hbox"));
box.appendChild(button);
box.appendChild(doc.createXULElement("spacer")).setAttribute("flex", 1);
var textbox = doc.createElementNS("http://www.w3.org/1999/xhtml", "input");
textbox.setAttribute("id", "downloadFilter");
textbox.setAttribute("clickSelectsAll", true);
textbox.setAttribute("type", "search");
textbox.setAttribute("placeholder", "Suchen...");
box.appendChild(textbox);
var closebtn = doc.createXULElement("toolbarbutton");
closebtn.setAttribute("id", "ucjsDownloadsStatusModoki-closebutton");
closebtn.setAttribute("class", "close-icon");
closebtn.setAttribute("tooltiptext", "Download-Leiste schließen");
box.appendChild(closebtn);
ref.parentNode.insertBefore(vbox, ref);
doc.getElementById("ucjs_clearListButton").addEventListener("command", function(event) {
win.ucjsDownloadsStatusModoki_clearDownloads();
});
doc.getElementById("downloadFilter")
.addEventListener("input", function(event) {
win.ucjsDownloadsStatusModoki_doSearch(event.target.value);
});
doc.getElementById("ucjsDownloadsStatusModoki-closebutton")
.addEventListener("command", function(event) {
win.ucjsDownloadsStatusModoki_doClose();
});
/*
// xxx Bug 1279329 "Copy Download Link" of context menu in Library is grayed out
var listBox = doc.getElementById("downloadsRichListBox");
var placesView = listBox._placesView;
if (placesView) {
var place = placesView.place;
placesView.place= null;
placesView.place = place;
}
*/
win.ucjsDownloadsStatusModoki_clearDownloads = function ucjs_clearDownloads() {
var DO_NOT_DELETE_HISTORY = true; /* custmizable true or false */
var richListBox = doc.getElementById("downloadsRichListBox");
Cu.import("resource://gre/modules/Services.jsm");
var places = [];
function addPlace(aURI, aTitle, aVisitDate) {
places.push({
uri: aURI,
title: aTitle,
visits: [{
visitDate: (aVisitDate || Date.now()) * 1000,
transitionType: Ci.nsINavHistoryService.TRANSITION_LINK
}]
});
}
function moveDownloads2History() {
if (DO_NOT_DELETE_HISTORY &&
!PrivateBrowsingUtils.isWindowPrivate(window)) {
try {
for (let element of richListBox.childNodes) {
let download = element._shell.download;
let aURI = makeURI(download.source.url);
// let aTitle = document.getAnonymousElementByAttribute(element, "class", "downloadTarget").value
let aTitle = download.target.path;
aTitle = aTitle.match( /[^\\]+$/i )[0];
aTitle = aTitle.match( /[^/]+$/i )[0];
let aVisitDate = download.endTime || download.startTime;
addPlace(aURI, aTitle, aVisitDate)
}
} catch(ex) {}
}
// Clear List
richListBox._placesView.doCommand('downloadsCmd_clearDownloads');
if (DO_NOT_DELETE_HISTORY &&
!PrivateBrowsingUtils.isWindowPrivate(window)) {
try {
if (places.length > 0) {
var asyncHistory = Components.classes["@mozilla.org/browser/history;1"]
.getService(Components.interfaces.mozIAsyncHistory);
asyncHistory.updatePlaces(places);
}
} catch(ex) {}
}
}
var btn = doc.getElementById("ucjs_clearListButton");
btn.setAttribute("disabled", true);
moveDownloads2History();
btn.removeAttribute("disabled");
// close toolbar
var closeWhenDone = false;
try {
closeWhenDone = Services.prefs.getBoolPref("userChrome.downloadsStatusModoki.closeWhenDone");
} catch(e) {}
if (closeWhenDone) {
top.ucjsDownloadsStatusModoki.hideDownloadsStatusModoki();
}
};
win.ucjsDownloadsStatusModoki_doSearch = function ucjs_doSearch(filterString) {
var richListBox = doc.getElementById("downloadsRichListBox");
richListBox._placesView.searchTerm = filterString;
};
win.ucjsDownloadsStatusModoki_doClose = function ucjs_doClose() {
top.ucjsDownloadsStatusModoki.hideDownloadsStatusModoki();
};
}
}
ucjsDownloadsStatusModoki.init();
Alles anzeigen
mit dieser CSS Datei
/* AGENT_SHEET *******************/
@charset "utf-8";
/*@version 2020/03/13 fix for 74, broken listitem orient due to Bug 1606130
/*@version 2019/12/11 fix for 73 Bug 1601094 - Rename remaining .xul files to .xhtml in browser */
/*@version 2019/10/20 12:30*/
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] {
-moz-box-orient: horizontal;
background-color: -moz-dialog !important;
padding: 0 !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] > stack:first-child {
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] #downloadsRichListBox {
background-color: -moz-dialog !important;
display:inline-block !important;
overflow-y: auto !important;
scrollbar-width: thin;
border: none !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] *|*:root
{
--downloads-item-height: 38px;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] richlistitem {
min-width:200px !important;
max-width:200px !important;
font-size: 13px !important;
border-width: 0 1px 0 0 !important;
border-style: solid !important;
border-color: black !important;
height: 38px !important;
display:-moz-inline-box !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] richlistitem vbox {
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] .downloadTypeIcon {
height:16px !important;
width: 16px !important;
-moz-margin-end: 1px !important;
-moz-margin-start: 1px !important;
padding-right: 1px !important;
padding-left: 1px !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] .downloadTarget {
margin-top:1px !important;
padding-bottom:16px !important;
max-width: calc(100% - 51px) !important;
min-width: calc(100% - 51px) !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] .download-state[state="0"] * .downloadTarget,
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] .download-state[state="4"] * .downloadTarget {
padding-bottom:0px !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] .downloadTarget:-moz-system-metric(windows-default-theme) {
margin-top:2px !important;
/*padding-bottom:10px; windows7 ?*/
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] *|*.downloadProgres {
border: none !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] *|*.downloadProgress:not([paused])::-moz-progress-bar {
background-color: lime !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] .downloadDetails {
margin-top:-12px !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] .download-state:not(:-moz-any([state="-1"], [state="5"], [state="0"], [state="4"], [state="7"])) .downloadDetails {
margin-top:-17px !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] richlistitem[selected] .downloadDetails {
opacity: 1 !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] .downloadButton {
padding: 0 !important;
margin: 0 !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] button > .button-box {
-moz-padding-start: 0px !important;
-moz-padding-end: 1px !important;
padding-right: 0 !important;
padding-left: 0 !important;
}
#contentAreaDownloadsView[ucjsDownloadsStatusModoki] #downloadFilter {
width: 150px;
}
Alles anzeigen
Hallo zusammen,
ich habe gerade festgestellt, das ucjsDownloadsStatusModoki.uc.js im aktuellem Nightly 77 nicht mehr funktioniert.
Es kommt eine Fehlermeldung das die Datei
AreaDownloadsView.xul
nicht mehr gefunden wird.
Auch wenn ich im Script ändere auf AreaDownloadsView.xhtml
kommt der selbe Fehler
Kann das eine Bestätigen?
Gruß
EDV-Oldi
Er will offensichtlich alle Buttons eingefärbt haben.
Alle Button die hier:
erscheinen und das ist mir mit Eure Hilfe gelungen.
Allerdings habe ich jetzt wieder Script und alle css Funktionen getrennt und den Abstand hier:
auch wieder vergrößert.
Noch einmal Danke für die Unterstützung.
Gruß
EDV-Oldi
Ja so habe ich das im Firefox 75, aber ab 76 funktioniert das nicht mehr.
Ihr habt ja jetzt auch die css Datei mit in das Script eingebunden, das habe ich mit diesen Buttons auch versucht und es funktioniert nicht, auch nicht mit eine separaten css Datei.
Gruß
EDV-Oldi
So ich habe den Code für mich noch etwas angepasst.
und hier mein Code:
// ==UserScript==
// @include chrome://mozapps/content/downloads/unknownContentType.xhtml
// @charset UTF-8
// @version Fx76+
// ==/UserScript==
(function() {
const Cu = Components.utils;
if (!window.FileUtils) Cu.import('resource://gre/modules/FileUtils.jsm');
if (!window.Services) Cu.import('resource://gre/modules/Services.jsm');
setTimeout(function() {
saveTo()
}, 200);
function saveTo() {
// Config
var dirArray = [
['C:\\Users\\000_000\\Desktop', 'Desktop'],
['C:\\Users\\000_000\\Documents', 'Dokumente'],
["C:\\Dropbox\\Chrome\\Thunderbird\\Adressbuch - Fotos"],
['C:\\Dropbox\\Programme_Treiber','Programme_Treiber'],
['D:\\Bilder', 'Bilder'],
['H:\\SG1\\Kontoauszüge\\WSW','WSW'],
["" + FileUtils.getDir('UChrm', []).path + "", "chrome"],
//["" + FileUtils.getDir('UChrm', ['SubScript']).path + "", "SubScript"],
["C:\\", "C:"],
["E:\\", "E:"],
["F:\\", "F:"],
["G:\\", "G:"],
["H:\\", "H:"]
];
let button = document.getElementById("unknownContentType").getButton("cancel");
let saveTo = button.parentNode.insertBefore(document.createXULElement("button"), button);
var saveToMenu = saveTo.appendChild(document.createXULElement("menupopup"));
saveTo.classList.toggle("dialog-button");
saveTo.label = "Speichern nach";
saveTo.type = "menu";
var css =`
dialog#unknownContentType{
background:silver !important;
} /* Hintergrund der Popup-Fenster */
#location {
color: red !important;
} /* Ausgewählte Datei */
.dialog-button[label="Speichern nach"]{
-moz-appearance: none!important;
color:white !important;
background: dodgerblue !important;
} /* Hintergrund des Button Speichern in */
hbox.dialog-button-box button.dialog-button menupopup {
background: gainsboro !important;
color:black !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem.menuitem-iconic:hover{
background: skyblue !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem.menuitem-iconic hbox.menu-iconic-left {
padding-left: 5px !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem.menuitem-iconic label.menu-iconic-text{
padding-right: 5px !important;
padding-left: 4px !important;
}
`;
var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
var uri = Services.io.newURI('data:text/css,' + encodeURIComponent(css))
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
dirArray.forEach(function(dir) {
var [name, dir] = [dir[1], dir[0]];
var mi = document.createXULElement("menuitem");
var item = saveToMenu.appendChild(mi);
item.setAttribute("label", (name || (dir.match(/[^\\/]+$/) || [dir])[0]));
item.setAttribute("image", "moz-icon:file:///" + dir + "\\");
item.setAttribute("class", "menuitem-iconic");
item.addEventListener("command", function() {
var file = new FileUtils.File(dir.replace(/\\/g, '\\\\') + '\\\\' + (document.getElementById('locationtext') ? document.getElementById('locationtext').value : document.getElementById('location').value));
dialog.mLauncher.saveToDisk(file, 1);
dialog.onCancel = function() {};
close();
});
});
}
}());
Alles anzeigen
Leider schaffe ich es nicht die beiden Button Datei speichern und Abrechen auch ein zu färben.
Hat da einer eine Idee?
Gruß
EDV-Oldi
Hast du das Script evtl. doppelt drin
Leider ja.
Das war aber nur im WIN Dateimanager zu sehen, einen mit einem kleinen Schreibfehler
Hallo Büssen,
Herzlichen Glückwunsch zum Geburtstag und bleib gesund.
Gruß
EDV-Oldi
Danke,
kann man den Code oben den an die neuen Megabar anpassen?
Du hattest ja beim letzten mal das auch gemacht.
Gruß
EDV-Oldi
Kann man die denn auch aus schaltet?
Endor schreibt ja
nicht mit aktiver Megabar getestet
Gruß
EDV-Oldi
Hallo Endor ,
leider funktioniert es bei mir nicht.
Bitte mal testen - nicht mit aktiver Megabar getestet:
Was ist die Megabar?
Gruß
EDV-Oldi
Hallo zusammen,
seit Firefox 75 funktioniert der farbige Ladebalken bei mir nicht mehr.
Was muss an diesem Code geändert werden?
//Location Bar Enhancer5.1;Loading Bar0.3.0
//Geändert von Sören
(function(){
var cssStr = (function(){/*
#urlbar {
background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,0), rgba(255,255,255,0) 6px, rgba(255,255,255,1) 6px, rgba(255,255,255,1) 6px), linear-gradient(to right, rgba(255,255,255) 0%, rgba(69,69,69) 100%);
background-size:0 0;
background-repeat:repeat-x, no-repeat;
transition: background-size 350ms ease 0s !important;
}
#urlbar:not([style="background-size: 0% 100%;"]) {
animation: progress-bar-stripes 2s linear infinite;
}
@-moz-keyframes progress-bar-stripes {
from {
background-position: 0, 0;
}
to {
background-position: 51px 0, 0;
}
}
*/}).toString().replace(/^.+\s|.+$/,"");
var style = document.createProcessingInstruction("xml-stylesheet", "type=\"text/css\"" + " href=\"data:text/css;base64," + btoa(cssStr) + "\"");
var mainW = document.getElementById("main-window");
document.insertBefore(style, mainW);
function main(window) {
var {document, gBrowser} = window;
function $(id) { return document.getElementById(id) };
var urlbar = $("urlbar");
let pageProgress = 0;
let async = makeWindowHelpers(window).async;
var LoadingBar = {
listener: {
onChangeTab: function(e) {
urlbar.style.backgroundSize = '0% 100%';
pageProgress = 0;
},
onProgressChange: function(aBrowser,webProgress,request,curSelfProgress,maxSelfProgress,curTotalProgress,maxTotalProgress) {
if (gBrowser.contentDocument === aBrowser.contentDocument) {
var val = (curTotalProgress-1)/(maxTotalProgress-1);
pageProgress = val;
urlbar.style.backgroundSize = (100*val) + '% 100%';
if (val > 0.9)
async(function() {
if (pageProgress > 0.95)
urlbar.style.backgroundSize = '100% 100%';
}, 1000);
}
},
onStateChange: function() {
if (pageProgress > 0.95){
async(function() {
urlbar.style.backgroundSize = '0% 100%';
pageProgress = 0;
}, 1000);
}else{
urlbar.style.backgroundSize = '0% 100%';
}
}
}
};
gBrowser.tabContainer.addEventListener('TabSelect',LoadingBar.listener.onChangeTab,false);
gBrowser.addTabsProgressListener(LoadingBar.listener);
unload(function() {
gBrowser.tabContainer.removeEventListener('TabSelect',LoadingBar.listener.onChangeTab,false);
gBrowser.removeTabsProgressListener(LoadingBar.listener);
}, window);
}
watchWindows(main, "navigator:browser");
function runOnLoad(window, callback, winType) {
window.addEventListener("load", function() {
window.removeEventListener("load", arguments.callee, false);
if (window.document.documentElement.getAttribute("windowtype") == winType)
callback(window);
}, false);
}
function runOnWindows(callback, winType) {
function watcher(window) {
try {
callback(window);
}
catch(ex) {}
}
let browserWindows = Services.wm.getEnumerator(winType);
while (browserWindows.hasMoreElements()) {
let browserWindow = browserWindows.getNext();
if (browserWindow.document.readyState == "complete")
watcher(browserWindow);
else
runOnLoad(browserWindow, watcher, winType);
}
}
function watchWindows(callback, winType) {
function watcher(window) {
try {
callback(window);
}
catch(ex) {}
}
runOnWindows(callback, winType);
function windowWatcher(subject, topic) {
if (topic == "domwindowopened")
runOnLoad(subject, watcher, winType);
}
Services.ww.registerNotification(windowWatcher);
unload(function() { Services.ww.unregisterNotification(windowWatcher) });
}
function unload(callback, container) {
let unloaders = unload.unloaders;
if (unloaders == null)
unloaders = unload.unloaders = [];
if (callback == null) {
unloaders.slice().forEach(function(unloader) { unloader() });
unloaders.length = 0;
return null;
}
if (container != null) {
container.addEventListener("unload", removeUnloader, false);
let origCallback = callback;
callback = function() {
container.removeEventListener("unload", removeUnloader, false);
origCallback();
}
}
function unloader() {
try {
callback();
}
catch(ex) {}
}
unloaders.push(unloader);
function removeUnloader() {
let index = unloaders.indexOf(unloader);
if (index != -1)
unloaders.splice(index, 1);
}
return removeUnloader;
}
function makeWindowHelpers(window) {
let {clearTimeout, setTimeout} = window;
function async(callback, delay) {
delay = delay || 0;
let timer = setTimeout(function() {
stopTimer();
callback();
}, delay);
function stopTimer() {
if (timer == null)
return;
clearTimeout(timer);
timer = null;
}
}
return {
async: async,
};
}
})();
Alles anzeigen
Gruß
EDV-Oldi
Hallo aborix,
in den Versionen 74.0.1 und 75.0 funktioniert Dein Script, es wird in der linken Spalte kein Button und Text eingeblendet. Aber in der rechten Spalte wird angezeigt das keine Updates gefunden werden.
Im aktuellen Nightly 76.0a1 vom 4. April wird ein Symbole und Text in der linken Spalte angezeigt.
Wie Sören schon schrieb, fehlt zur Zeit die Angabe in der rechten Spalte.
Dein Script funktioniert also bei mir.
Bild ist von der Version 76.0a1
Gruß
EDV-Oldi
Es wird mit dem Script aus #2 keine Funktion ausgelöst...
Auch wenn Du das Script nicht benutzt, sondern selbst nach Updates suchst, passiert im aktuellen Nightly bei mir nichts.
Genau so ist das bei Thunderbird, ich würde sagen abwarten.
Gruß
EDV-Oldi