könnte das die Standard-Anpassung für die JS-Codes sein
Nein.
Es kommt immer auch drauf an, wo das Icon erstellt wird.
Schad'. GL
könnte das die Standard-Anpassung für die JS-Codes sein
Nein.
Es kommt immer auch drauf an, wo das Icon erstellt wird.
Schad'. GL
Jepp: jetzt ist wieder alles da.
Vielen Dank. L
Hallo Mira,
könnte das die Standard-Anpassung für die JS-Codes sein, die ich heute in dem anderen Thread schon angefragt hatte?
Oder gilt das exklusiv für diesen Code?
Grüße Lionsson
Teste bitte:
JavaScript Alles anzeigen//ScrollTopAndBottom.uc.js // ab Fx 143 (function() { if (location.href !== 'chrome://browser/content/browser.xhtml') return; let menuitem = document.createXULElement('menuitem'); menuitem.id = 'context-to-top'; menuitem.classList.add('menuitem-iconic'); menuitem.setAttribute('tooltiptext' , ''); menuitem.style.setProperty('--menuitem-icon', 'url(chrome://browser/skin/downloads/downloads.svg)'); let refItem = document.getElementById('context-reload'); refItem.parentNode.insertBefore(menuitem, refItem); //click menuitem.addEventListener('click', () => { if (event.button == 0) { ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo(0,0) ' , false); } }); })(); (function() { if (location.href !== 'chrome://browser/content/browser.xhtml') return; let menuitem = document.createXULElement('menuitem'); menuitem.id = 'context-to-bottom'; menuitem.classList.add('menuitem-iconic'); menuitem.setAttribute('tooltiptext' , ''); menuitem.style.setProperty('--menuitem-icon', 'url(chrome://browser/skin/downloads/downloads.svg)'); let refItem = document.getElementById('context-reload'); refItem.parentNode.insertBefore(menuitem, refItem); //click menuitem.addEventListener('click', () => { if (event.button == 0) { ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo(0,100000) ' , false); } }); var css = ` #context-to-top { --menuitem-icon: url("chrome://browser/skin/downloads/downloads.svg"); transform:rotate(180deg)!important; margin-left: 0px !important; margin-right: 10px !important; }`; var cssUri = Services.io.newURI('data:text/css,' + encodeURIComponent(css), null, null); var SSS = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService); SSS.loadAndRegisterSheet(cssUri, SSS.AGENT_SHEET); })();
"Einwandfrei" kann ich nicht wirklich beurteilen. Besagte Buttons in der obesten Zeile sind jedenfalls wieder da, vielen Dank.
Grüße Lionsson
Hallo Mira,
ich hoffe, dass Du Dich noch nciht an meinem vor ein paar Minuten geposteten Skript versucht hast.
Dieses hier funktioniert tatsächlich nicht mehr richtig, und zwar insofern, als in der obersten Zeile die Buttons nicht mehr alle angezeigt werden:
//ScrollTopAndBottom.uc.js
//Tab schließen zusätzlich eingefügt
(function() {
if (location.href !== 'chrome://browser/content/browser.xhtml') return;
let menuitem = document.createXULElement('menuitem');
menuitem.id = 'context-to-top';
menuitem.classList.add('menuitem-iconic');
menuitem.setAttribute('tooltiptext' , '');
menuitem.style.listStyleImage='url("chrome://browser/skin/downloads/downloads.svg")';
let refItem = document.getElementById('context-reload');
refItem.parentNode.insertBefore(menuitem, refItem);
//click
menuitem.addEventListener('click', () => {
if (event.button == 0) {
ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo(0,0) ' , false);
}
});
})();
(function() {
if (location.href !== 'chrome://browser/content/browser.xhtml') return;
let menuitem = document.createXULElement('menuitem');
menuitem.id = 'context-to-bottom';
menuitem.classList.add('menuitem-iconic');
menuitem.setAttribute('tooltiptext' , '');
menuitem.style.listStyleImage='url("chrome://browser/skin/downloads/downloads.svg")';
let refItem = document.getElementById('context-reload');
refItem.parentNode.insertBefore(menuitem, refItem);
//click
menuitem.addEventListener('click', () => {
if (event.button == 0) {
ownerGlobal.gBrowser.selectedBrowser.messageManager.loadFrameScript(' data: , content.scrollTo(0,100000) ' , false);
}
});
var css = '\
#context-to-top { \
list-style-image: url("chrome://browser/skin/downloads/downloads.svg");\
transform:rotate(180deg)!important;\
}\
#context-to-top,\
#context-to-bottom {\
order: -1 !important;\
}';
var cssUri = Services.io.newURI('data:text/css,' + encodeURIComponent(css), null, null);
var SSS = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
SSS.loadAndRegisterSheet(cssUri, SSS.AGENT_SHEET);
})();
(function() {
if (location.href !== 'chrome://browser/content/browser.xhtml') return;
let menuitem = document.createXULElement('menuitem');
menuitem.id = 'Tab schließen';
menuitem.classList.add('menuitem-iconic');
menuitem.setAttribute('tooltiptext' , 'Tab schließen');
menuitem.style.listStyleImage='url(chrome://global/skin/icons/close-12.svg)';
let refItem = document.getElementById('context-reload');
refItem.parentNode.insertBefore(menuitem, refItem);
//click
menuitem.addEventListener('click', () => {
if (event.button == 0) {
BrowserCommands.closeTabOrWindow();
}
});
})();
Alles anzeigen
Moin moin,
nach dem Update auf 143.0 funktionieren ja offensichtlich etliche Skripte nicht mehr. Gibt es womöglich neue Standard-Codezeilen, die generell in allen Codes der verschiedenen Skripte angepasst werden müssen?
Grüße Lionsson
Beeeeeeeeeeeedankt. GL
war für die senkrechten Striche in der URL-Leiste
Und das dann bitte auch testen:
JavaScript Alles anzeigen/* Restore 'Space & Separator' items script for Firefox 102+ by Aris Default browser scripts always remove spaces and separators from default palette, so because of that they are added to an own toolbar now. - spaces and separators can be moved to any toolbar - to remove spaces or separators move them into palette - configuration toolbar behaves like a default toolbar, items and buttons can be placed on it - configuration toolbar is not visible outside customizing mode - default "Flexible Space" item is hidden from palette and added to configuration toolbar [!] BUG: do not move spaces, flexible spaces or separator to configuration toolbar or it will cause glitches [!] BUG: do not move main 'space'-item to palette or it will be hidden until customizing mode gets reopened [!] Fix for WebExtensions with own windows by 黒仪大螃蟹 (for 1-N scripts) */ //ChromeUtils.importESModule("resource:///modules/CustomizableUI.sys.mjs"); var appversion = parseInt(Services.appinfo.version); var AddSeparator = { init: function() { if (location != 'chrome://browser/content/browser.xhtml') return; /* blank tab workaround */ try { if(gBrowser.selectedBrowser.getAttribute('blank')) gBrowser.selectedBrowser.removeAttribute('blank'); } catch(e) {} var tb_config_label = "Configuration Toolbar"; var tb_spacer_label = "Space"; var tb_sep_label = "Separator"; var tb_spring_label = "Flexible Space"; try { if(document.getElementById('configuration_toolbar') == null) { var tb_config = document.createXULElement("toolbar"); tb_config.setAttribute("id","configuration_toolbar"); tb_config.setAttribute("customizable","true"); tb_config.setAttribute("class","toolbar-primary chromeclass-toolbar browser-toolbar customization-target"); tb_config.setAttribute("mode","icons"); tb_config.setAttribute("iconsize","small"); tb_config.setAttribute("toolboxid","navigator-toolbox"); tb_config.setAttribute("lockiconsize","true"); tb_config.setAttribute("ordinal","1005"); tb_config.setAttribute("defaultset","toolbarspacer,toolbarseparator"); document.querySelector('#navigator-toolbox').appendChild(tb_config); CustomizableUI.registerArea("configuration_toolbar", {legacy: true}); CustomizableUI.registerToolbarNode(tb_config); var tb_label = document.createXULElement("label"); tb_label.setAttribute("label", tb_config_label+": "); tb_label.setAttribute("value", tb_config_label+": "); tb_label.setAttribute("id","tb_config_tb_label"); tb_label.setAttribute("removable","false"); tb_config.appendChild(tb_label); var tb_spacer = document.createXULElement("toolbarspacer"); tb_spacer.setAttribute("id","spacer"); tb_spacer.setAttribute("class","chromeclass-toolbar-additional"); tb_spacer.setAttribute("customizableui-areatype","toolbar"); tb_spacer.setAttribute("removable","false"); tb_spacer.setAttribute("label", tb_spacer_label); tb_config.appendChild(tb_spacer); var tb_sep = document.createXULElement("toolbarseparator"); tb_sep.setAttribute("id","separator"); tb_sep.setAttribute("class","chromeclass-toolbar-additional"); tb_sep.setAttribute("customizableui-areatype","toolbar"); tb_sep.setAttribute("removable","false"); tb_sep.setAttribute("label", tb_sep_label); tb_config.appendChild(tb_sep); var tb_spring = document.createXULElement("toolbarspring"); tb_spring.setAttribute("id","spring"); tb_spring.setAttribute("class","chromeclass-toolbar-additional"); tb_spring.setAttribute("customizableui-areatype","toolbar"); tb_spring.setAttribute("removable","false"); tb_spring.setAttribute("flex","1"); tb_spring.setAttribute("label", tb_spring_label); tb_config.appendChild(tb_spring); // CSS var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"].getService(Components.interfaces.nsIStyleSheetService); var uri = Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(` #configuration_toolbar { appearance: none !important; background-color: var(--toolbar-bgcolor); background-image: var(--toolbar-bgimage); background-clip: padding-box; color: var(--toolbar-color, inherit); } #main-window:not([customizing]) #configuration_toolbar { visibility: collapse; } #main-window[customizing] #configuration_toolbar #tb_config_tb_label { font-weight: bold !important; } #main-window[customizing] #configuration_toolbar :is(#spacer,#separator,#spring) { margin-inline-start: 20px; } #main-window[customizing] #configuration_toolbar :is(#wrapper-spacer,#wrapper-separator,#wrapper-spring) .toolbarpaletteitem-label { display: block !important; margin-inline-end: 20px; } #main-window[customizing] #wrapper-spacer #spacer { margin: 2px 0 !important; } #main-window[customizing] #configuration_toolbar #wrapper-spring #spring { margin: -1px 0 !important; min-width: 80px !important; } #main-window[customizing] #configuration_toolbar > * { padding: 2px !important; } #main-window[customizing] #configuration_toolbar > :is(#wrapper-spacer,#wrapper-separator,#wrapper-spring) { border: 1px dotted !important; margin-inline-start: 2px !important; margin-inline-end: 2px !important; } #main-window[customizing] toolbarspacer { border: 1px solid !important; } toolbar[orient="vertical"] toolbarseparator { appearance: none !important; border-top: 1px solid rgba(15,17,38, 0.5) !important; border-bottom: 1px solid rgba(255,255,255, 0.3) !important; margin: 2px 2px !important; height: 1px !important; } toolbar[orient="vertical"] toolbarspacer { appearance: none !important; height: 18px !important; width: 18px !important; } #customization-palette toolbarpaletteitem[id^="wrapper-customizableui-special-spring"], #customization-palette-container :is(#spring,#wrapper-spring) { display: none !important; } #main-window:not([customizing]) toolbar:not(#configuration_toolbar) toolbarspring { max-width: 100% !important; } /*#menubar-items + spacer { display: none !important; }*/ `), null, null); sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET); } } catch(e){} } } /* initialization delay workaround */ document.addEventListener("DOMContentLoaded", AddSeparator.init(), false); /* Use the below code instead of the one above this line, if initialization issues occur on startup */ /* setTimeout(function(){ AddSeparator.init(); },2000); */
Könnt Ihr bitte zeigen, was dieses Script kann? Wo sind die senkrechten Striche?
Grüße Lionsson
Guten Morgen.
Man kann den „Alle Tabs auflisten“-Button auch an anderen Stellen platzieren. Mir z.B. gefällt er in der Menüleiste ganz rechts.
Grüße Lionsson
Ich bitte um Entschuldigung: die Schreibweise SaveTo.uc.js hat mir geholfen.
Abgesehen davon bin ich großer Fan eine kurzen "description" in einer der ersten Zeile eines jeden Skripts.
GL
Diese Version ist nun auch bei Github zu finden:
https://github.com/Endor8/userChr…39/saveto.uc.js
Mfg.
Endor
Was kann saveto.uc.js? Grüße Lionsson
Vielen Dank. Lionsson
Finde auch keine alternative, da es kaum was gibt
Hast Du mal Save Page WE ausprobiert?
Grüße Lionsson
Hallo,
dafür gibt es bereits Tastenkombinationen. Strg + 1 öffnet den ersten Tab. Das Gleiche kannst du entsprechend mit den Zahlen 2 bis 8 für den zweiten bis achten Tab machen. Und Strg + 9 öffnet den letzten Tab.
Inzwischen 139.0
Moin Moin.
Strg + 1 bis Strg + 6 funzt bei mir wie von Dir beschrieben. Strg + 7 bis Strg + 9 leider nicht.
Edit:
So war es hier bis vor ein paar Minuten. Dann habe ich mich erinnert, dass ja Erweiterungen auch gerne mal Tastenkombinationen okkupieren. Und siehe da: Zoom Page WE bietet die Einstellungsoption "Enable Ctrl+7, Ctrl+8 and Ctrl+9 shortcuts". Häkchen entfernt und schon funktioniert es wie von Dir in Beitrag #2 beschrieben.
Vielen Dank für's Wecken. Lionsson
Hallo Horst1 .
Schau Dir doch mal die Erweiterung Tab Session Manager an.
Wenn Du besagte 6 Tabs in einem separaten Fenster öffnest und dieses Fenster schließt, wird es Dir von Tab Session Manager später wieder zum Öffnen angeboten.
Ich habe immer viele Tabs zu den unterschiedlichsten Themen geöffnet und arbeite seit langer Zeit so. Anmerkung hierzu: Die Gruppen, die Andreas Dir heute Nachmittag vorgestellt hat, könnten ein Gutteil der Funktionen von Tab Session Managerübernehmen. Ich bin damit aber noch nicht 100% klar...
Btw: Das von Dir beschriebene Fehlfunktion kann ich nicht bestätigen. Hier werden - und das hat nicht mit Tab Session Manager zu tun - alle Tabs, die beim letzten Beenden von FF geöffnet waren, beim Neustart geöffnet. Und das sind mitunter mehrere 100(!).
Grüße Lionsson
...mitunter hilft ja das Denken in Extremen.
Gibt es Performance-Unterschiede (Startgeschwindigkiet, Stabilität,...) zwischen den Optionen einerseits z.B. 100 einzelnen JS-Dateien für 100 Funktionen oder andererseits einer einzigen JS-Datei mit allen Funktionen.
Übersichtlichkeit, Auffindbarkeit und ähnliche Kriterien mal außen vor gelassen: vielleicht ist es ja etwas theoretisch gedacht, aber die isolierte Betrachtung eines Problems kann ja manchmal zu mehr Klarheit verhelfen.
GL
Moinsen.
Für sowohl Kontext und Button habe ich 2 Skripte zusammengefügt:
// Button > Firefox beenden
// angepasst für Fx 138 by Mira_Belle
/* ----------------------------------------------------------------------------------- */
/* Zu beachten ist, dass die Grafiken sich im richtigen Ordner befinden müssen */
/* %appdata%\Mozilla\Firefox\Profiles\"Profilname"\chrome\icons */
/* ----------------------------------------------------------------------------------- */
(function() {
if (location != 'chrome://browser/content/browser.xhtml') return;
try {
CustomizableUI.createWidget({
id: "fp-quit",
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
let buttonicon = "quit.svg";
let fallbackIcon = "chrome://global/skin/icons/warning.svg";
let iconFile = Services.dirsvc.get("ProfD", Ci.nsIFile);
iconFile.append("chrome");
iconFile.append("icons");
iconFile.append(buttonicon);
let iconExists = iconFile.exists();
let iconURL = iconExists
? "file://" + iconFile.path.replace(/\\/g, "/")
: fallbackIcon;
// Immer einfärben (lime), bei Fallback ggf. andere Farbe zusätzlich
let iconStyle = 'list-style-image: url("' + iconURL + '"); fill: lime;';
if (!iconExists) {
iconStyle += ' fill: red;';
}
let toolbaritem = aDocument.createElementNS(
'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul',
'toolbarbutton'
);
let props = {
id: "fp-quit",
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
label: "Beenden",
tooltiptext: "Beenden",
style: iconStyle
};
for (let p in props)
toolbaritem.setAttribute(p, props[p]);
return toolbaritem;
}
});
} catch (e) { }
document.getElementById('fp-quit').addEventListener( "click", onClick );
function onClick(event) {
goQuitApplication(event);
}
})();
//Fox_schließen_Context
(function() {
if (location.href !== 'chrome://browser/content/browser.xhtml')
return;
const label = 'Fox schließen';
//const oncommand = "goQuitApplication(event);";
//const curProfDir = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir));
const menuitem1 = document.createXULElement('menuitem');
menuitem1.id = 'contextTest';
menuitem1.setAttribute('label', label);
//menuitem1.setAttribute('oncommand', oncommand);
menuitem1.addEventListener('command', () => {
goQuitApplication(event);
});
const refItem1 = document.getElementById('context-inspect');
refItem1.parentNode.insertBefore(menuitem1, refItem1.nextSibling);
})();
Alles anzeigen
Funktionieren tut das hier (138.0.3), aber: Macht das eigentlich Sinn?
Grüße Lionsson
...inzwischen 138.0.3
Vielleicht habe ich etwas holprig formuliert, daher hier ein zweiter Versuch:
Gibt es eine Möglichkeit, einen Tab zu einer gespeicherten und nicht geöffneten Tab-Gruppe inzuzufügen?
Grüße Lionsson