Dann funkt dir ein anderes Skript dazwischen
Genau das war der Grund, nehme alles zurück, funktioniert tadellos.
Dann funkt dir ein anderes Skript dazwischen
Genau das war der Grund, nehme alles zurück, funktioniert tadellos.
Ich jetzt auch mal, und hier funktioniert alles
Das verstehe ich nicht, auch in v143 das gleiche Problem hier. Es war ja nur ein Test, mein Appmenu funktioniert dagegen tadellos.
Hat doch etwas gedauert.
Die letzte Version habe ich mal in Nightly getestet, da funktioniert hier nur das Menü "Firefox Verzeichnisse" und "about:-Seiten".
Letzteres mit der Einschränkung, dass sich about:logins nicht aufrufen lässt, musste ich anpassen. Ja, sonst konnte ich keinen Restart ausführen, und der Fox lässt sich auch nicht beenden.
Nur mal so als Hinweis: Wenn du mal wieder Cu. siehst und das nicht mehr funktioniert, kannst du versuchen stattdessen ChromeUtils. zu verwenden.
Danke für diesen Hinweis!
So musste ich auch in der Beta Änderungen machen, weil es da ja auch schon Bestandteil ist.
Ich danke euch, alles wieder hübsch.
Der steht in Zeile 475 und funktioniert.
Ich bezog mich auf das Script aus #1, aber der Code bleibt identisch. Nur komisch, hier funktioniert er nicht mehr. Auch in anderen Scripten, wie extra-config-menu.uc.js oder Script für Browser-Werkzeuge, wo der Mittelklick die Entwickler-Wekzeuge bisher geöffnet hat. Hier ist mal das Script, kannst ja bitte mal schauen, was da nicht rund läuft.
// Button_Werkzeuge.uc.js
// Linksklick öffnet die Browser-Werkzeuge
// Mittelklick öffnet die Entwickler-Werkzeuge
// Rechtsklick öffnet die Browser-Konsole
(function() {
if (!window.gBrowser)
return;
try {
CustomizableUI.createWidget({
id: 'buttonWerkzeuge',
type: 'custom',
defaultArea: CustomizableUI.AREAS,
onBuild: function(aDocument) {
var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
var props = {
id: 'buttonWerkzeuge',
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
removable: true,
// Name im AnpassungFenster
label: 'Werkzeuge aufrufen',
// Name bei MausHover wenn in Symbolleiste
tooltiptext: 'Links Browser-Werkzeuge / Mitte Entwickler-Werkzeuge / Rechts Browser-Konsole',
style: 'list-style-image: url("file:///C:/FoxIcons2/werkzeuge.png")',
};
for (var p in props)
toolbaritem.setAttribute(p, props[p]);
return toolbaritem;
}
});
} catch(e) { };
document.getElementById('buttonWerkzeuge').addEventListener('click', event => {
if (event.button == 2) {
let { require } = ChromeUtils.importESModule("resource://devtools/shared/loader/Loader.sys.mjs", {});
let { BrowserConsoleManager } = require('resource://devtools/client/webconsole/browser-console-manager');
BrowserConsoleManager.openBrowserConsoleOrFocus();
}
if (event.button == 0) {
let { require } = ChromeUtils.importESModule("resource://devtools/shared/loader/Loader.sys.mjs", {});
let { BrowserToolboxLauncher } = require('resource://devtools/client/framework/browser-toolbox/Launcher.sys.mjs');
BrowserToolboxLauncher.init();
}
if (event.button == 1) {
let { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});
let { gDevToolsBrowser } = require('devtools/client/framework/devtools-browser');
gDevToolsBrowser.toggleToolboxCommand(window.gBrowser, Cu.now());
}
});
})();
Alles anzeigen
Nachtrag: Sorry, das Ganze natürlich im aktuellen Nightly.
Im Script, ab Zeile 381, funktioniert der Aufruf der Entwickler-Werkzeuge bei Dir noch?
Und ich danke für das Übungsobjekt.
Aber gerne doch!
Ich habe noch ein weiteres Script, es nach deiner Lösung erweitert, und auch dieses arbeitet wieder fehlerfrei.
// ==UserScript==
// @include chrome://mozapps/content/downloads/unknownContentType.xhtml
// @charset UTF-8
// @version Fx139+
// ==/UserScript==
(function () {
if (location.href !== 'chrome://mozapps/content/downloads/unknownContentType.xhtml') return;
const Cu = Components.utils;
const { FileUtils } = ChromeUtils.importESModule( 'resource://gre/modules/FileUtils.sys.mjs');
setTimeout(function () {
saveTo();
}, 200);
function saveTo() {
// Config
const dirArray = [
['D:\\Download Firefox', 'Download Firefox'],
['D:\\Download Firefox\\Dokumente'],
['D:\\Download Firefox\\Bilder'],
['D:\\Download Firefox\\Software'],
['D:\\Download Firefox\\Ablage'],
['D:\\Download Firefox\\Sonstiges'],
["C:\\", "C:"],
["E:\\", "E:"],
];
const button = document.getElementById('unknownContentType').getButton('cancel');
const saveTo = button.parentNode.insertBefore(document.createXULElement('button'), button);
const saveToMenu = saveTo.appendChild(document.createXULElement('menupopup'));
saveTo.classList.toggle('dialog-button');
saveTo.label = 'Speichern in…';
saveTo.type = 'menu';
const css =`
hbox.dialog-button-box button.dialog-button menupopup {
background: gold !important;
min-width: 220px !important;
padding: 5px 5px 5px 5px !important;
margin: 15px 0 0 -62px !important;
border: 3px solid dodgerblue !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem{
appearance: none !important;
color: blue !important;
font-size: 15px !important;
font-weight: 600 !important;
background: #fefefc !important;
border: 1px solid silver !important;
margin-top: 1px !important;
padding: 2px 5px 2px 12px !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem:hover {
background: greenyellow !important;
border: 1px solid red !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem.menuitem-iconic label.menu-text{
color: blue !important;
font-size: 15px !important;
font-weight: 700 !important;
padding: 3px 0 1px 15px !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem.menuitem-iconic > label {
padding-left: 10px !important;
}
/* [FF139+] -> */
hbox.dialog-button-box button.dialog-button menupopup menuitem:not([highlightable]) > .menu-highlightable-text, menuitem[highlightable] > .menu-text {
display: none;
}
/* <- [FF139+] */
`;
const sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
const uri = Services.io.newURI('data:text/css,' + encodeURIComponent(css));
sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
dirArray.forEach(function (directory) {
const [name, dir] = [directory[1], directory[0]];
const dir1 = dir.replaceAll(' ', '%20');
const mi = document.createXULElement('menuitem');
const item = saveToMenu.appendChild(mi);
item.setAttribute('label', (name || (dir.match(/[^\\/]+$/) || [dir])[0]));
item.setAttribute('image', 'moz-icon:file:///' + dir1 + '\\');
item.setAttribute('class', 'menuitem-iconic');
item.addEventListener('click', function () {
const locationtext = document.getElementById('locationtext');
const pathFile = dir + '\\' + (locationtext ? locationtext.value : document.getElementById('location').value);
const file = new FileUtils.File(pathFile);
dialog.mLauncher.saveDestinationAvailable(file);
dialog.onCancel = function () {};
close();
});
});
}
}());
Alles anzeigen
Code Alles anzeigendirArray.forEach(item => { let [name, dir] = [item[1], item[0]]; let dir1 = dir.replaceAll(' ', '%20'); saveToMenu.appendChild(createEl(document, "menuitem", { label: name || (dir.match(/[^\\/]+$/) || [dir])[0], dir: dir, dir1: dir1, image: "moz-icon:file:///" + dir1 + "\\", class: "menuitem-iconic", onclick: function() { let dir = this.getAttribute('dir'); let locationtext = document.getElementById('locationtext'); let file = new FileUtils.File(dir + '\\' + (locationtext ? locationtext.value : document.getElementById('location').value)); dialog.mLauncher.saveDestinationAvailable(file); dialog.onCancel = function() {}; close(); } })); })
Ich bedanke mich ganz herzlich bei dir, das ist die Lösung.
Neues Profil, ohne Anpassungen:
Es ist ja nicht wie bei armen Leuten, Profile gibt es in allen Versionen genügend, aber das Problem tritt überall auf.
Ich verstehe nur nicht, wieso mit meinem Win11, und bei euch nicht. Das muss eine Ursache hier haben, die ich wohl nicht herausfinden werde.
So funktioniert es auch:
Alles probiert, ohne Erfolg.
Sonst wäre Fuchsfan das wohl schon eher aufgefallen.
Das stimmt Andreas, mit den Versionen Beta und Nightly führe ich keine Downloads aus, nur mit meinem Arbeitsfox.
Ausblenden sieht dann so aus:
Danke, Andreas!
Hast du zu diesem Skript zusätzlich noch CSS in Benutzung? Dann bitte auch posten...
Ja, den habe ich, aber hat das wirklich Einfluss darauf, denn die icon werde doch durch das Script selbst eingelesen. Oder?
/*======== Download-Fenster ** Datei speichern und öffnen mit **** einfärben ==========*/
/*== in Verbindung mit Script saveTo.uc.js / css-Regeln für Popup dort eingearbeitet ==*/
/* verhindert bei "Datei speichern" die Umrandung */
@-moz-document url(chrome://mozapps/content/downloads/unknownContentType.xhtml) {
:root {
--focus-outline-width: 0 !important;
}
}
@-moz-document url(chrome://mozapps/content/downloads/unknownContentType.xhtml) {
/* Öffnen mit - bei verknüpftem Programm */
#openHandler{
appearance: none!important;
min-height:20px!important;
padding-left: 4px !important;
padding-right: 4px !important;
background:lightblue!important; /* Hintergrund der Zeile */
}
/* Öffnen mit DropDown-Menü Hintergrundfarbe */
#openHandlerPopup {
background: lightgreen !important;
}
/* Öffnen mit DropDown-Menü Separatoren entfernt */
#openHandlerPopup > menuseparator:nth-child(3) {
display: none !important;
}
/* Hintergrund des Popup-Fenster */
dialog#unknownContentType{
background: #fff963 !important;
}
/* Dateiname in Farbe */
#location {
color: red !important;
}
/* Hintergrund der einzelnen Button */
hbox.dialog-button-box button[label="Speichern nach"]{
appearance: none!important;
color: white !important;
background: dodgerblue !important;
border: 1px solid black !important;
border-radius: 0 !important;
padding-left: 4px !important;
padding-right: 4px !important;
padding-bottom: 3px !important;
}
hbox.dialog-button-box button[label="Speichern nach"]:hover {
appearance: none !important;
color: white !important;
background: blue !important;
border: 1px solid red !important;
}
hbox.dialog-button-box button[label="Abbrechen"] {
appearance: none !important;
color: white !important;
background: red !important;
border: 1px solid grey !important;
border-radius: 0 !important;
padding-left: 4px !important;
padding-right: 4px !important;
padding-bottom: 3px !important;
}
hbox.dialog-button-box button[label="Abbrechen"]:hover {
appearance: none !important;
color: white !important;
background: green !important;
border: 1px solid red !important;
}
hbox.dialog-button-box button[label="Datei speichern"] {
appearance: none !important;
color: white !important;
background: green !important;
border: 1px solid grey !important;
border-radius: 0 !important;
padding-left: 4px !important;
padding-right: 4px !important;
padding-bottom: 3px !important;
}
hbox.dialog-button-box button[label="Datei speichern"]:hover {
appearance: none !important;
color: blue !important;
background: orange !important;
border: 1px solid red !important;
}
hbox.dialog-button-box button[label="OK"] {
appearance: none !important;
color: blue !important;
background: #ffbf0a !important;
border: 1px solid grey !important;
border-radius: 0 !important;
padding-left: 4px !important;
padding-right: 4px !important;
padding-bottom: 2px !important;
}
hbox.dialog-button-box button[label="OK"]:hover {
appearance: none !important;
color: white !important;
font-weight: bold !important;
background: forestgreen !important;
border: 1px solid red !important;
}
hbox.dialog-button-box button.dialog-button menupopup {
appearance: none !important;
background: gold !important;
min-width: 260px !important;
padding: 5px 5px 5px 5px !important;
margin: 15px 0 0 -62px !important;
border: 3px solid dodgerblue !important;
border-radius: 0 !important;
box-shadow: inset 2em 2em lightblue !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem{
appearance: none !important;
color: blue !important;
font-size: 15px !important;
font-weight: 600 !important;
background: #fefefc !important;
border: 1px solid silver !important;
margin-bottom: 3px !important;
padding: 1px 5px 1px 12px !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem:hover {
background: greenyellow !important;
border: 1px solid red !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem.menuitem-iconic label.menu-text{
color: blue !important;
font-size: 15px !important;
font-weight: 700 !important;
padding: 3px 0 1px 15px !important;
}
hbox.dialog-button-box button.dialog-button menupopup menuitem.menuitem-iconic > label {
padding-left: 10px !important;
}
/* [FF139+] -> */
hbox.dialog-button-box button.dialog-button menupopup menuitem:not([highlightable]) > .menu-highlightable-text, menuitem[highlightable] > .menu-text {
display: none !important;
}
/* <- [FF139+] */
}
Alles anzeigen
Es sind auch hier nur die Kästchen zu sehen, wie auch bei anderen Scripten schon. Mit css bekomme ich diese nicht ausgeblendet, wer kann bitte helfen.
....das Script
// ==UserScript==
// @include chrome://mozapps/content/downloads/unknownContentType.xhtml
// @charset UTF-8
// @sandbox true
// @version 20250615 Fx139+
// ==/UserScript==
(function() {
const { FileUtils } = ChromeUtils.importESModule('resource://gre/modules/FileUtils.sys.mjs');
if (location.href !== 'chrome://mozapps/content/downloads/unknownContentType.xhtml') return;
setTimeout(function() {
saveTo()
}, 100);
function saveTo() {
// config
const dirArray = [
['D:\\Download Firefox', 'Download Firefox'],
['D:\\Download Firefox\\Dokumente'],
['D:\\Download Firefox\\Bilder'],
['D:\\Download Firefox\\Software'],
['D:\\Download Firefox\\Ablage'],
['D:\\Download Firefox\\Sonstiges'],
["C:\\", "C:"],
["E:\\", "E:"],
];
let saveTo = createEl(document, 'button', {
id: 'saveto',
class: 'dialog-button',
size: 'small',
label: 'Speichern nach',
type: 'menu',
});
let saveToMenu = createEl(document, 'menupopup');
saveToMenu.appendChild(createEl(document, "html:link", {
rel: "stylesheet",
href: "chrome://global/skin/global.css"
}));
saveToMenu.appendChild(createEl(document, "html:link", {
rel: "stylesheet",
href: "chrome://global/content/elements/menupopup.css"
}));
saveTo.appendChild(saveToMenu);
dirArray.forEach(item => {
let [name, dir] = [item[1], item[0]];
saveToMenu.appendChild(createEl(document, "menuitem", {
label: name || (dir.match(/[^\\/]+$/) || [dir])[0],
dir: dir,
image: "moz-icon:file:///" + dir + "\\",
class: "menuitem-iconic",
onclick: function() {
let dir = this.getAttribute('dir');
let locationtext = document.getElementById('locationtext');
let file = new FileUtils.File(dir + '\\' + (locationtext ? locationtext.value : document.getElementById('location').value));
dialog.mLauncher.saveDestinationAvailable(file);
dialog.onCancel = function() {};
close();
}
}));
})
dialog.dialogElement('unknownContentType').getButton('cancel').before(saveTo);
}
function createEl (doc, type, attrs = {}) {
let el = type.startsWith('html:') ? doc.createElementNS('http://www.w3.org/1999/xhtml', type) : doc.createXULElement(type);
for (let key of Object.keys(attrs)) {
if (key === 'innerHTML') {
el.innerHTML = attrs[key];
} else if (key.startsWith('on')) {
el.addEventListener(key.slice(2).toLocaleLowerCase(), attrs[key]);
} else {
el.setAttribute(key, attrs[key]);
}
}
return el;
}
}());
Alles anzeigen
Dann teste es bitte mit einem neuen Profil, ohne Klickibunti und Scripte.
Nun gut, dann wird es hier wohl wegen des Scripts nicht auftreten. Dann halte ich mich da raus, sorry.
aber auf der linken Seite, und da ist der Fehler leider vorhanden
Auch auf der linken Seite habe ich das Problem nicht, Version 143b06.
wenn die Seitenleiste auf der rechten Seite ist, überlappt sie die Bildlaufleiste des Seiteninhalts.
Das kann ich so nicht bestätigen.