Du solltest mehr an dich selbst glauben, dass du das kannst.
Dem schließe ich mich an. Schaue einfach mal zurück, was du schon an Initiative in die Arbeit mit Benutzerskripten hineingesteckt hast. Den ersten Schritt hast du schon lange getan.
Du solltest mehr an dich selbst glauben, dass du das kannst.
Dem schließe ich mich an. Schaue einfach mal zurück, was du schon an Initiative in die Arbeit mit Benutzerskripten hineingesteckt hast. Den ersten Schritt hast du schon lange getan.
Da sind wir uns doch wieder alle einig.
Mir ist da gerade der Browser abgeschmiert, falsche Taste betätigt!
Mh, weiß aber gerade nicht mehr, was ich noch so alles geschrieben hatte.
Egal.
Die Frage, die sich mir stellt, mach' ich weiter wie bisher, oder soll, muss ich aufhören?
Die Frage, die sich mir stellt, mach' ich weiter wie bisher, oder soll, muss ich aufhören?
Weder noch, nutze das, was dir zur Verfügung steht, auch die KI, behalte aber die Kontrolle und du wirst mit ziemlicher Sicherheit das Beste daraus machen. Ich denke mal, du wirst dann auch ein Gespür dafür bekommen, wenn was schief läuft oder gut ist.
Mira_Belle Du musst überhaupt nichts. Wir haben in diesem Forum keine verbindliche KI-Politik. Es ist deine freie Entscheidung, ob und in welcher Form du versuchst, zu helfen. Es wäre natürlich dennoch schön, wenn du das Gesagte zumindest als gut gemeinten Ratschlag und Motivation für einen nachhaltigeren Ansatz statt als Angriff gegen dich annehmen könntest. Denn wenn du dich darauf einlässt, bist du besser als die KI.
Muss noch einen Nachtragen, was irgendwie immer vergessen geht.
Ich nutze nicht immer KI!
Ich habe auf meiner Platte genug Beispielcode, den ich als Referenz nutze, manches weiß ich halt einfach,
da brauch ich nicht mehr nach zu guggn. Aber jetzt, wo es am Code von FF solche Änderungen gibt,
nutze ich eben auch KI, nicht eine, sondern gleich mehrere und veranstalte auch schon mal ein Battle.
Auch muss so ein korrigiertes und angepasstes Skript getestet werden und hie oder da fällt mir auch selber auf,
dass da was am Code nicht stimmen kann.
Was ich ganz gerne mache, ich lass mir von "LeChat" UND ChatGPT und 'Duck.ai' den Code von JS Zeile für Zeile erklären.
Apropos 'Duck.ai', das ist nicht nur eine KI! Es können aus mehrere ausgewählt werden.
Und dann gibt es ja noch "https://lmarena.ai/", sehr interessant.
//
Ich habe die Beiträge zum usercssloader.uc.js mal verschoben nach:
In der Nightly 144 funktioniert dieses Skript nicht mehr!
// newTabButtonUndoTabList.uc.js
"use strict";
/* ******************************************************************************************************** */
/* Beschreibung */
/* Bei Rechtsklick auf die Neuen Tab Schaltfläche, wird im Kontextmenü, */
/* der Eintrag zum Wiederherstellen des zuletzt geschlossenen Tabs angezeigt. */
/* Customized by BrokenHeart */
/* */
/* https://www.camp-firefox.de/forum/thema/112673/?postID=1223733#post1223733 */
/* https://www.camp-firefox.de/forum/thema/112673/?postID=1228286#post1228286 */
/* */
/* ******************************************************************************************************** */
(function () {
if (!window.gBrowser){
return;
}
gBrowser.tabContainer.addEventListener('click', function (e) {
if (e.originalTarget.id != 'tabs-newtab-button') return;
switch (e.button) {
case 1:
undoCloseTab(0);
break;
case 2:
UCT.makePopup(e);
e.preventDefault();
break;
}
}, false);
})();
var UCT = {
init: function () {
var mp = document.createXULElement("menupopup");
mp.id = "undo-close-tab-list";
mp.addEventListener('popupshowing', function(event) {
UCT.onpopupshowing(event);
}, true);
mp.setAttribute("placespopup", true);
mp.setAttribute("tooltip", "bhTooltip");
mp.setAttribute("popupsinherittooltip", true);
document?.getElementById("mainPopupSet")?.appendChild(mp);
},
makePopup: function (e) {
if (SessionStore.getClosedTabCountForWindow(window) != 0) {
document.getElementById("undo-close-tab-list").openPopupAtScreen(e.screenX +2, e.screenY +2, false);
}
else
{
console.log("--- Es gibt keinen Tab, der wiederhergestellt werden kann ---");
}
},
onpopupshowing: function (e) {
var popup = e.target;
var m;
while (popup.hasChildNodes())
popup.removeChild(popup.firstChild);
let undoItems = SessionStore.getClosedTabDataForWindow(window);
undoItems.map(function (item, id) {
// var m = document.createXULElement('menuitem');
m = document.createXULElement("menuitem");
m.setAttribute('label', item.title);
m.setAttribute('image', item.image);
m.setAttribute('class', 'menuitem-iconic bookmark-item');
m.addEventListener('command', () => {
undoCloseTab(id);
}
);
popup.appendChild(m);
});
popup.appendChild(document.createXULElement("menuseparator"));
m = document.createXULElement("menuitem");
m.setAttribute("label", "Chronik in der Sidebar öffnen");
m.setAttribute("image", "chrome://browser/skin/history.svg");
m.setAttribute("class", "menuitem-iconic");
m.addEventListener('command', function() {
SidebarController.toggle('viewHistorySidebar');
}, true);
popup.appendChild(m);
},
};
setTimeout(function() {
UCT.init();
},250);
Alles anzeigen
Kann das jemand bestätigen und kann das jemand auch in der 143 überprüfen?
Danke
Sorry, die Beschreibung von mir war schlecht!
Aussehen tut es auch bei mir in der Nightly so!
Nur klicke mal auf einen "Eintrag".
Öffnet sich da bei Dir der Tab?
Öffnet sich da bei Dir der Tab?
Nein, in beiden Versionen wird kein neuer Tab geöffnet.
Nein, in beiden Versionen wird kein neuer Tab geöffnet.
Bitte testen (Anpassung in Zeile 73):
// newTabButtonUndoTabList.uc.js
"use strict";
/* ******************************************************************************************************** */
/* Beschreibung */
/* Bei Rechtsklick auf die Neuen Tab Schaltfläche, wird im Kontextmenü, */
/* der Eintrag zum Wiederherstellen des zuletzt geschlossenen Tabs angezeigt. */
/* Customized by BrokenHeart */
/* */
/* https://www.camp-firefox.de/forum/thema/112673/?postID=1223733#post1223733 */
/* https://www.camp-firefox.de/forum/thema/112673/?postID=1228286#post1228286 */
/* */
/* ******************************************************************************************************** */
(function () {
if (!window.gBrowser){
return;
}
gBrowser.tabContainer.addEventListener('click', function (e) {
if (e.originalTarget.id != 'tabs-newtab-button') return;
switch (e.button) {
case 1:
undoCloseTab(0);
break;
case 2:
UCT.makePopup(e);
e.preventDefault();
break;
}
}, false);
})();
var UCT = {
init: function () {
var mp = document.createXULElement("menupopup");
mp.id = "undo-close-tab-list";
mp.addEventListener('popupshowing', function(event) {
UCT.onpopupshowing(event);
}, true);
mp.setAttribute("placespopup", true);
mp.setAttribute("tooltip", "bhTooltip");
mp.setAttribute("popupsinherittooltip", true);
document?.getElementById("mainPopupSet")?.appendChild(mp);
},
makePopup: function (e) {
if (SessionStore.getClosedTabCountForWindow(window) != 0) {
document.getElementById("undo-close-tab-list").openPopupAtScreen(e.screenX +2, e.screenY +2, false);
}
else
{
console.log("--- Es gibt keinen Tab, der wiederhergestellt werden kann ---");
}
},
onpopupshowing: function (e) {
var popup = e.target;
var m;
while (popup.hasChildNodes())
popup.removeChild(popup.firstChild);
let undoItems = SessionStore.getClosedTabDataForWindow(window);
undoItems.map(function (item, id) {
// var m = document.createXULElement('menuitem');
m = document.createXULElement("menuitem");
m.setAttribute('label', item.title);
m.setAttribute('image', item.image);
m.setAttribute('class', 'menuitem-iconic bookmark-item');
m.addEventListener('command', () => {
SessionStore.undoCloseTab(window,id);
}
);
popup.appendChild(m);
});
popup.appendChild(document.createXULElement("menuseparator"));
m = document.createXULElement("menuitem");
m.setAttribute("label", "Chronik in der Sidebar öffnen");
m.setAttribute("image", "chrome://browser/skin/history.svg");
m.setAttribute("class", "menuitem-iconic");
m.addEventListener('command', function() {
SidebarController.toggle('viewHistorySidebar');
}, true);
popup.appendChild(m);
},
};
setTimeout(function() {
UCT.init();
},250);
Alles anzeigen
Bitte testen
Funktioniert wieder in Fx 143 + 144
Beim Skript SaveTo.uc.js werden im Fx v143 bei mir die Symbole für Ordner nicht mehr angezeigt, deren Symbole aus der Windows-Datei %SystemRoot%\System32\SHELL32.dll stammen, Symbole aus eigenen Grafikdateien schon. Ansonsten tut das Skript, was es soll.
Was muss da geändert werden, damit es wieder funktioniert?
Müsste das hier sein:
Achte auf dir1
Nachtrag: das ist es auch.
Müsste das hier sein:
...
Achte auf dir1
Nachtrag: das ist es auch.
Dankeschön! Da lag ich ja komplett daneben. Darauf, dass es mit den Leerzeichen im Pfad und nichts mit der Symbolherkunft zu tun hat, bin ich nicht gekommen.
Kein Ding, wie im besagten Thema hat es auch bei mir etwas gedauert, und ich musste zwei/drei Dinge kombinieren.
Nur als Info, es gibt eine neue Version vom Script:
SaveTo.uc.js
Eure Anpassungen müsst Ihr noch einfügen.
Mfg.
Endor
Mod custom_scrollbars.uc.js. Dies ist eine ganz kleine Änderung am Skript von Aris-t2, jetzt funktioniert das Skript vollständig und problemlos in Firefox 143+ (Gradient-farbe, Pfeile usw.). Die Version von Aris-t2 auf GitHub funktioniert nicht in Firefox 142 und 143.
Um in den Ordnern der Lesezeichenleiste zu scrollen, fügen Sie den zweiten Code in userChrome.css hinzu.
"use strict";
/* This Mod adapted for Firefox 143+ */
/* Firefox userChrome.js tweaks - 'Custom Scrollbars' for Firefox
https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/custom_scrollbars.uc.js
Version: 2.0.5 for Firefox 115+
NOTE: 'non-compatible options' from earlier versions were removed
README
about:config >
widget.windows.overlay-scrollbars.enabled > false (Windows)
widget.gtk.overlay-scrollbars.enabled > false (Linux)
[!] The above preferences have to be set to 'false' for this code to work
[!] STARTUP CACHE HAS TO BE DELETED AFTER EVERY CHANGE!
-> finding 'startupCache' folder: address bar > about:profiles > Local Directory > Open Folder > startupCache
-> close Firefox
-> delete 'startupCache' folders content
Modifying appearance > change values
- enable/disable options: true <-> false
- color
- name: red, blue, transparent
- hex code: #33CCFF, #FFF
- rgb(a): rgba(0,0,255,0.8)
- hsl(a): hsla(240,100%,50%,0.8)
- numbers: 1, 2, 3 ... 10, 11, 12 ...
- opacity: 0.0 to 1.0 e.g. 1.4, 1,75
- gradients: linear-gradient(direction, color, color, color)
- gradients example: linear-gradient(to right, blue, #33CCFF, rgba(0,0,255,0.8))
- predefined gradients: transparent,rgba(255,255,255,0.5),transparent -> transparent,rgba(255,255,255,0.0),transparent
- no color or no color value -> use "unset"
- arrow icons
- files have to be downloaded from https://github.com/Aris-t2/CustomJSforFx/tree/master/icons
- files have to be placed inside 'icons' (sub)folder --> 'chrome\icons'
- own svg files can also be used, if they are named up.svg, down.svg, left.svg, right.svg
*/
(function() {
/* General scrollbar settings *******************************************************/
// default: hide_scrollbars = false
const hide_scrollbars = false;
// default: hide_scrollbar_buttons = false
const hide_scrollbar_buttons = false;
// default: thin_scrollbars = false / browsers own way to show thin scrollbars
const thin_scrollbars = false;
// default: custom_scrollbar_opacity = false
const custom_scrollbar_opacity = false;
// default: custom_opacity_value = "1.0"
const custom_opacity_value = "1.0";
/* Custom scrollbar settings ("custom_scrollbar_" --> "cs_") ************************/
// default: custom_scrollbars = true
const custom_scrollbars = true;
// default: custom_scrollbar_arrows = true
const custom_scrollbar_arrows = true;
// default: custom_scrollbar_arrows_version = 1
// 1 ==> SVG arrows as code: might not work on some pages
// 2 ==> SVG arrows as files: files have to be downloaded from
// https://github.com/Aris-t2/CustomJSforFx/tree/master/icons
// and placed inside 'chrome\icons' folder
const custom_scrollbar_arrows_version = 1;
// default: custom_scrollbar_arrows_color = "grey"; / # ==> %23 e.g. #33CCFF ==> %2333CCFF
// only for 'custom_scrollbar_arrows_version = 1'
const custom_scrollbar_arrows_color = "black";
// default: cs_thumb_border = 0 / in px
const cs_thumb_border = 0;
// default: cs_thumb_roundness = 0 / in px
const cs_thumb_roundness = 9;
// default: cs_buttons_border = 0 / in px
const cs_buttons_border = 0;
// default: cs_buttons_roundness = 0 / in px
const cs_buttons_roundness = 0;
// default: cs_ignore_color_gradients = false / 'flat' scrollbars
const cs_ignore_color_gradients = false;
/* Custom scrollbar colors and gradients ********************************************/
// default: cs_background_color = "#DDDDDD"
const cs_background_color = "#DDDDDD";
// default: cs_background_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"
let cs_background_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_background_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
let cs_background_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_corner_background_color = "#DDDDDD" / - corner
const cs_corner_background_color = "#DDDDDD";
// default: cs_corner_background_image = "linear-gradient(45deg,transparent 30%,rgba(255,255,255,0.5) 50%,transparent 70%),linear-gradient(-45deg,transparent 30%,rgba(255,255,255,0.5) 50%,transparent 70%)"
let cs_corner_background_image = "linear-gradient(45deg,transparent 30%,rgba(255,255,255,0.5) 50%,transparent 70%),linear-gradient(-45deg,transparent 30%,rgba(255,255,255,0.5) 50%,transparent 70%)";
// default: cs_thumb_color = "#33CCFF" / thumb/slider
const cs_thumb_color = "#33CCFF";
// default: cs_thumb_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"
let cs_thumb_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_thumb_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
let cs_thumb_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_thumb_hover_color = "#66FFFF"
const cs_thumb_hover_color = "#66FFFF";
// default: cs_thumb_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"
let cs_thumb_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_thumb_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
let cs_thumb_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_thumb_border_color = "#33CCFF"
const cs_thumb_border_color = "#33CCFF";
// default: cs_buttons_color = "#66FFFF" / buttons
const cs_buttons_color = "#66FFFF";
// default: cs_buttons_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"
let cs_buttons_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_buttons_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
let cs_buttons_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_buttons_hover_color = "#33CCFF"
const cs_buttons_hover_color = "#33CCFF";
// default: cs_buttons_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"
let cs_buttons_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_buttons_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
let cs_buttons_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)";
// default: cs_buttons_border_color = "#33CCFF"
const cs_buttons_border_color = "#33CCFF";
/* ******************************************************************************************** */
/* ******************************************************************************************** */
let ProfilePathChrome = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome'));
// unset background image color gradients -> flat scrollbars
if(cs_ignore_color_gradients === true)
cs_background_image_vertical
= cs_background_image_horizontal
= cs_corner_background_image
= cs_thumb_image_vertical
= cs_thumb_image_horizontal
= cs_thumb_hover_image_vertical
= cs_thumb_hover_image_horizontal
= cs_buttons_image_vertical
= cs_buttons_image_horizontal
= cs_buttons_hover_image_vertical
= cs_buttons_hover_image_horizontal
= "unset";
let custom_scrollbars_code='';
let custom_scrollbar_arrows_code='';
let hide_scrollbar_buttons_code='';
let custom_scrollbar_opacity_code='';
let hide_scrollbars_code='';
let thin_scrollbars_code='';
if(custom_scrollbars === true)
custom_scrollbars_code=`
slider, scrollcorner, scrollbar thumb, scrollbar scrollbarbutton {
appearance: auto;
-moz-default-appearance: none !important;
}
slider {
background-color: ${cs_background_color} !important;
}
scrollbar[vertical] slider {
background-image: ${cs_background_image_vertical} !important;
}
scrollbar slider {
background-image: ${cs_background_image_horizontal} !important;
}
scrollcorner {
background-color: ${cs_corner_background_color} !important;
background-image: ${cs_corner_background_image} !important;
}
scrollbar thumb {
background-color: ${cs_thumb_color} !important;
border-radius: ${cs_thumb_roundness}px !important;
box-shadow: inset 0 0 0 ${cs_thumb_border}px ${cs_thumb_border_color} !important;
}
scrollbar[vertical] thumb {
background-image: ${cs_thumb_image_vertical} !important;
min-height: 17px !important;
}
scrollbar thumb {
background-image: ${cs_thumb_image_horizontal} !important;
min-width: 17px !important;
}
scrollbar thumb:hover, scrollbar thumb:active {
background-color: ${cs_thumb_hover_color} !important;
}
scrollbar[vertical] thumb:hover, scrollbar[vertical] thumb:active {
background-image: ${cs_thumb_hover_image_vertical} !important;
}
scrollbar thumb:hover, scrollbar thumb:active {
background-image: ${cs_thumb_hover_image_horizontal} !important;
}
scrollbar scrollbarbutton {
background-color: ${cs_buttons_color} !important;
border-radius: ${cs_buttons_roundness}px !important;
box-shadow: inset 0 0 0 ${cs_buttons_border}px ${cs_buttons_border_color} !important;
height: 17px !important;
width: 17px !important;
}
scrollbar[vertical] scrollbarbutton {
background-image: ${cs_buttons_image_vertical} !important;
}
scrollbar scrollbarbutton {
background-image: ${cs_buttons_image_horizontal} !important;
}
scrollbar scrollbarbutton:hover {
background-color: ${cs_buttons_hover_color} !important;
}
scrollbar[vertical] scrollbarbutton:hover {
background-image: ${cs_buttons_hover_image_vertical} !important;
}
scrollbar scrollbarbutton:hover {
background-image: ${cs_buttons_hover_image_horizontal} !important;
}
`;
if(custom_scrollbar_arrows === true && custom_scrollbar_arrows_version === 1)
custom_scrollbar_arrows_code=`
scrollbar scrollbarbutton {
background-repeat: no-repeat !important;
background-position: center center !important;
}
scrollbar[vertical] scrollbarbutton[type="decrement"] {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='${custom_scrollbar_arrows_color}' %3E%3Cpath d='m7.247 4.86-4.796 5.481c-.566.647-.106 1.659.753 1.659h9.592a1 1 0 0 0 .753-1.659l-4.796-5.48a1 1 0 0 0-1.506 0z'/%3E%3C/svg%3E ") !important;
}
scrollbar[vertical] scrollbarbutton[type="increment"] {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='${custom_scrollbar_arrows_color}' %3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E ") !important;
}
scrollbar scrollbarbutton[type="decrement"] {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='${custom_scrollbar_arrows_color}' %3E%3Cpath d='m3.86 8.753 5.482 4.796c.646.566 1.658.106 1.658-.753V3.204a1 1 0 0 0-1.659-.753l-5.48 4.796a1 1 0 0 0 0 1.506z'/%3E%3C/svg%3E ") !important;
}
scrollbar scrollbarbutton[type="increment"] {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='${custom_scrollbar_arrows_color}' %3E%3Cpath d='m12.14 8.753-5.482 4.796c-.646.566-1.658.106-1.658-.753V3.204a1 1 0 0 1 1.659-.753l5.48 4.796a1 1 0 0 1 0 1.506z'/%3E%3C/svg%3E ") !important;
}
`;
else if(custom_scrollbar_arrows === true && custom_scrollbar_arrows_version === 2)
custom_scrollbar_arrows_code=`
scrollbar scrollbarbutton {
background-repeat: no-repeat !important;
background-position: center center !important;
}
scrollbar[vertical] > scrollbarbutton[type="decrement"] {
background-image: url("${ProfilePathChrome}/icons/up.svg") !important;
}
scrollbar[vertical] > scrollbarbutton[type="increment"] {
background-image: url("${ProfilePathChrome}/icons/down.svg") !important;
}
scrollbar > scrollbarbutton[type="decrement"] {
background-image: url("${ProfilePathChrome}/icons/left.svg") !important;
}
scrollbar > scrollbarbutton[type="increment"] {
background-image: url("${ProfilePathChrome}/icons/right.svg") !important;
}
`;
if(hide_scrollbar_buttons === true)
hide_scrollbar_buttons_code=`
scrollbar scrollbarbutton {
opacity: 0 !important;
}
scrollbar[vertical] scrollbarbutton {
min-height: 1px !important;
height: 1px !important;
max-height: 1px !important;
}
scrollbar scrollbarbutton {
min-width: 1px !important;
width: 1px !important;
max-width: 1px !important;
}
`;
if(custom_scrollbar_opacity === true)
custom_scrollbar_opacity_code=`
scrollbar {
opacity: ${custom_opacity_value} !important;
}
`;
if(hide_scrollbars === true)
hide_scrollbars_code=`
scrollbar, scrollcorner {
display: none !important;
visibility: collapse !important;
}
`;
if(thin_scrollbars === true)
thin_scrollbars_code=`
:root{
scrollbar-width: thin !important;
}
scrollbar[vertical] scrollbarbutton {
height: 14px !important;
width: 7px !important;
}
scrollbar scrollbarbutton {
height: 7px !important;
width: 14px !important;
}
`;
Components.classes["@mozilla.org/content/style-sheet-service;1"]
.getService(Components.interfaces.nsIStyleSheetService)
.loadAndRegisterSheet(Services.io.newURI("data:text/css;charset=utf-8," + encodeURIComponent(`
${custom_scrollbars_code}
${custom_scrollbar_arrows_code}
${hide_scrollbar_buttons_code}
${custom_scrollbar_opacity_code}
${hide_scrollbars_code}
${thin_scrollbars_code}
`), null, null),
Components.classes["@mozilla.org/content/style-sheet-service;1"]
.getService(Components.interfaces.nsIStyleSheetService).AGENT_SHEET);
})();
Alles anzeigen
Schön lenny2, was genau hast Du am JavaScript geändert,
und wofür ist das CSS?
Und eine weitere Frage, wenn das CSS für das JavaScript so wichtig ist,
wäre es dann nicht besser "es" zu integrieren?
Nachtrag
Natürlich habe ich mal drübergeschaut, ja, und ich könnte das Skript auch
genauer "untersuchen", aber das möchte ich erst einmal nicht.
Das mache ich nur, wenn es für "mich" und meiner Version des Scrollbarskripts Vorteile,
bzw. Verbesserungen bringt.
Noch ein Nachtrag!
Sehe ich das richtig, dass nur die Selektoren im JS "erneuert" wurden,
so wie ich es gemacht habe?
Bleibt für mich dann nur noch die Frage nach dem CSS,
wofür ist es?
Bleibt für mich dann nur noch die Frage nach dem CSS,
wofür ist es?
CSS wird für das Skript nicht benötigt. CSS ist eigenständig, es fügt Scrollbar zu den Ordnern der Lesezeichenleiste hinzu und kann sowohl separat als auch zusammen mit dem Skript verwendet werden. Wenn Sie CSS + JS verwenden, wird der Scrollstil aus dem Skript auch auf Ordner mit Lesezeichen angewendet.