2002Andreas Eine Sache noch, wird die horizontale Scrollbar den richtig angezeigt?
lenny2 Danke, vielen Dank. Habe in meinem Skript zumindest den Schieber jetzt mit Farbverlauf.
2002Andreas Eine Sache noch, wird die horizontale Scrollbar den richtig angezeigt?
lenny2 Danke, vielen Dank. Habe in meinem Skript zumindest den Schieber jetzt mit Farbverlauf.
2002Andreas Komisch.
Hast Du das CSS und das JS einfach so genommen, oder irgendetwas verändert?
lenny2 Nur weil ich wissbegierig bin habe ich es in der Nightly ausprobiert.
Im CSS sind Fehler! Zeile 7, 57, 82 & 87.
Nicht ); !important; sondern ) !important;
Ohne agent-sheet.js tut sich nichts, was auch klar ist, aber mit eben auch nichts!
/* Use with agent-sheet-scrollbar.js */
/* Set your choice in about:config: widget.non-native-theme.scrollbar.style > 0, 1, 2, 3, 4 or 5 */
Steht bei mir auf 0
Ich mag in about:config nicht gerne Einstellungen verändern! Nur, wenn es absolut nicht anders geht.
Nachtrag!
Ich bin mir auch absolut sicher, dass auch hier in diesem CSS die Änderungen von
[orient="vertical"] & [orient="horizontal"] zu [vertical] & [horizontal] gemacht werden müssen.
Bei [disabled="true"], [orientation="right"] & [orientation="left"] bin ich mir nicht sicher.
Müsste man testen oder in den Untiefen des Firefox in Erfahrung bringen.
lenny2 Das mit dem Radius lässt sich in der Konfiguration einstellen.
Dass in den Ordnern die Scrollbar nicht richtig funktioniert, hat für mich erst einmal keine Priorität.
Denn die muss man erst per Anpassung sich "erschaffen"!
Der Fehler, den Du in der Animation zeigst, den habe ich bisher noch nicht gesehen.
Aber da die Scrolleisten z.Z. scheinbar eine Baustelle seitens Mozilla sind, muss ich wohl geduldig sein.
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?
2002Andreas Danke.
Also schon ab der 143 das gleiche Problem.
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
Und hier "meine" Version 2.0.7 RC3 for Firefox 143+
Die Geschichte des Farbverlaufs und der fehlenden Pfeile in der horizontalen Scrollbar scheint am Firefox zu liegen.
Kann jemand mal das Skript, so wie es ist, im Firefox 143 testen? Danke.
// Scrollbar.uc.js
"use strict";
/* Firefox userChrome.js tweaks - 'Custom Scrollbars' for Firefox ************************************************************ */
/* Original by Aris (aris-addons@gmx.net)************************************************************************************* */
/* Github: https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/custom_scrollbars.uc.js
/* *************************************************************************************************************************** */
/* Customized by Mira********************************************************************************************************* */
/* https://www.camp-firefox.de/forum/thema/135133-custom-scrollbars-uc-js-anpassen/ ****************************************** */
/* Scrollbar.v1.0.6.js https://www.camp-firefox.de/forum/thema/135133/?postID=1207718#post1207718************************** */
/* https://www.camp-firefox.de/forum/thema/136152/?postID=1222989#post1222989************************************************* */
/* Scrollbar.v2.0.2.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223096#post1223096************************** */
/* Scrollbar.v2.0.3.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223124#post1223124************************** */
/* Scrollbar.v2.0.5.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223143#post1223143************************** */
/* Scrollbar.v2.0.6.1.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223162#post1223162************************** */
/* *************************************************************************************************************************** */
/* Custom Scrollbars for Firefox ********************************************************************************************* */
/* Version: 2.0.7 RC3 for Firefox 143+ *************************************************************************************** */
/* ******************************************************************************************************************************
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
[!] DER STARTUP-CACHE MUSS NACH JEDER ÄNDERUNG GELÖSCHT WERDEN!
-> Ordner 'startupCache' finden: Adressleiste > about:profiles > Lokales Verzeichnis > Ordner öffnen > startupCache
-> Firefox schließen
-> Inhalt des 'startupCache'-Ordners löschen
Alternativ mit einem JavaScipt!
-> https://github.com/Endor8/userChrome.js/blob/master/Firefox%2087/RestartFirefoxButtonM.uc.js
Anpassungen vornehmen > Werte ändern
- Optionen aktivieren/deaktivieren: true <-> false
- Farbe
- Name: red, blue, transparent
- Hexcode: #33CCFF, #FFF
- rgb(a): rgba(0,0,255,0.8)
- hsl(a): hsla(240,100%,50%,0.8)
- Zahlen: 1, 2, 3 ... 10, 11, 12 ...
- Deckkraft (in Dezimalzahlen): 0.0 bis 1.0 z.B. 1.4 oder 1.75
- Farbverläufe: linear-gradient(direction, color, color, color)
- Beispiel für Farbverläufe: linear-gradient(to right, blue, #33CCFF, rgba(0,0,255,0.8))
- vordefinierte Farbverläufe: transparent,rgba(255,255,255,0.5),transparent -> transparent,rgba(255,255,255,0.0),transparent
- keine Farbe oder keine Farbwerte -> verwende "unset"
*/
/* *************************************************************************************************************************** */
(function() {
// PROFILE PHATH "CALCULATE"
let ProfileDirectory = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons'));
// GENERAL SCROLLBAR SETTINGS
const custom_scrollbar_size_value = 17; // in px // default: custom_scrollbar_size_value = 17
const hide_scrollbars = false; // default: hide_scrollbars = false
const hide_scrollbar_buttons = false; // default: hide_scrollbar_buttons = false
const thin_scrollbars = false; // default: thin_scrollbars = false / browsers own way to show thin scrollbars
const custom_scrollbar_opacity = false; // default: custom_scrollbar_opacity = false
const custom_opacity_value = "1.0"; // default: custom_opacity_value = "1.0"
// CUSTOM SCROLLBAR SETTINGS ("custom_scrollbar_" --> "cs_")
const custom_scrollbars = true; // default: custom_scrollbars = true
const custom_scrollbar_arrows = true; // default: custom_scrollbar_arrows = true
const custom_scrollbar_arrows_version = 1; // default: custom_scrollbar_arrows_version = 1
// 1 ==> SVG arrows as code: might not work on some pages
// 2 ==> SVG arrows as files: placed inside 'chrome\icons' folder
// only for 'custom_scrollbar_arrows_version = 1'
const custom_scrollbar_arrows_color = "%23bfbfbf"; // default: custom_scrollbar_arrows_color = "grey"; / # ==> %23 e.g. #33CCFF ==> %2333CCFF
const custom_scrollbar_arrows_hover_color = "%23ffae00"; // default: custom_scrollbar_arrows_hover_color = "orange"; # ==> %23
const cs_thumb_border = 1; // default: cs_thumb_border = 0 / in px 1
const cs_thumb_roundness = 26; // default: cs_thumb_roundness = 0 / in px 9
const cs_buttons_border = 0; // default: cs_buttons_border = 0 / in px
const cs_buttons_roundness = 0; // default: cs_buttons_roundness = 0 / in px
const cs_thumb_minimal_size = 12; // default: cs_thumb_minimal_size = 12; / in px
const cs_ignore_color_gradients = false; // default: cs_ignore_color_gradients = false / 'flat' scrollbars
// CUSTOM SCROLLBAR COLORS/GRADIENTS
// - background
const cs_background_color = "#AEC5FA"; // default: cs_background_color = "#DDDDDD"
let cs_background_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_background_image_vertical = "linear-gradient(to right,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_background_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
let cs_arrows_on_buttons_buttons_size = 1.0; // default: cs_arrows_on_buttons_buttons_size = 1.0
const cs_background_roundness = 26;
// - corner
const cs_corner_background_color = "#CCCCCC"; // default: cs_corner_background_color = "#DDDDDD" / - corner
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_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%)"
// - thumb/slider
const cs_thumb_color = "#33CCFF"; // default: cs_thumb_color = "#33CCFF" / thumb/slider
let cs_thumb_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_thumb_image_vertical = "linear-gradient(to right,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_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const cs_thumb_hover_color = "#66FFFF"; // default: cs_thumb_hover_color = "#66FFFF"
let cs_thumb_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_thumb_hover_image_vertical = "linear-gradient(to right,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_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const cs_thumb_border_color = "#33CCFF"; // default: cs_thumb_border_color = "#33CCFF"
// - buttons
const cs_buttons_color = "Bahama Blue"; // default: cs_buttons_color = "#66FFFF" "#5b5b66"/ buttons
let cs_buttons_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_buttons_image_vertical = "linear-gradient(to right,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_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const cs_buttons_hover_color = "#bfffff"; // default: cs_buttons_hover_color = "#33CCFF"
const cs_buttons_border_color = "#33CCFF"; // default: cs_buttons_border_color = "#33CCFF" "#5b5b66"
let cs_buttons_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_buttons_hover_image_vertical = "linear-gradient(to right,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_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
/* *************************************************************************************************************************** */
// 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;
border-radius: ${cs_background_roundness}px !important;
}
scrollbar[horizontal] slider {
background-image: ${cs_background_image_horizontal} !important;
border-radius: ${cs_background_roundness}px !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 thumb[vertical] {
background-image: ${cs_thumb_image_vertical} !important;
min-height: 17px !important;
}
scrollbar thumb[horizontal] {
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 thumb[vertical]:hover, scrollbar thumb[vertical]:active {
background-image: ${cs_thumb_hover_image_vertical} !important;
}
scrollbar thumb[horizontal]:hover, scrollbar thumb[horizontal]: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[horizontal] 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[horizontal] 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[horizontal] 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[horizontal] 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;
}
scrollbar[vertical] > scrollbarbutton[type="decrement"]:hover {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='`+custom_scrollbar_arrows_hover_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;
background-repeat: no-repeat !important;
background-position: top !important;
}
scrollbar[vertical] > scrollbarbutton[type="increment"]:hover {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='`+custom_scrollbar_arrows_hover_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;
background-repeat: no-repeat !important;
background-position: bottom !important;
}
scrollbar[horizontal] > scrollbarbutton[type="decrement"]:hover {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='`+custom_scrollbar_arrows_hover_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;
background-repeat: no-repeat !important;
background-position: left !important;
}
scrollbar[horizontal] > scrollbarbutton[type="increment"]:hover {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='`+custom_scrollbar_arrows_hover_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;
background-repeat: no-repeat !important;
background-position: right !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("${ProfileDirectory}/Chevron-up_hellgrau.svg") !important;
}
scrollbar[vertical] > scrollbarbutton[type="increment"] {
background-image: url("${ProfileDirectory}/Chevron-down_hellgrau.svg") !important;
}
scrollbar[horizontal] > scrollbarbutton[type="decrement"] {
background-image: url("${ProfileDirectory}/Chevron-left_hellgrau.svg") !important;
}
scrollbar[horizontal] > scrollbarbutton[type="increment"] {
background-image: url("${ProfileDirectory}/Chevron-right_hellgrau.svg") !important;
}
/* Hover */
scrollbar[vertical] > scrollbarbutton[type="decrement"]:hover {
background-image: url("${ProfileDirectory}/Chevron-up_orange.svg") !important;
}
scrollbar[vertical] > scrollbarbutton[type="increment"]:hover {
background-image: url("${ProfileDirectory}/Chevron-down_orange.svg") !important;
}
scrollbar[horizontal] > scrollbarbutton[type="decrement"]:hover {
background-image: url("${ProfileDirectory}/Chevron-left_orange.svg") !important;
}
scrollbar[horizontal] > scrollbarbutton[type="increment"]:hover {
background-image: url("${ProfileDirectory}/Chevron-right_orange.svg") !important;
}
scrollbar[vertical] > scrollbarbutton {
height: ${(custom_scrollbar_size_value*cs_arrows_on_buttons_buttons_size)}px !important;
max-width: ${custom_scrollbar_size_value}px !important;
}
scrollbar[horizontal] > scrollbarbutton {
width: ${(custom_scrollbar_size_value*cs_arrows_on_buttons_buttons_size)}px !important;
max-height: ${custom_scrollbar_size_value}px !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[horizontal] 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[horizontal] 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
So und hier mein TEST!
In beiden Fällen das gleiche Skript.
Der einzige Unterschied, die Verwendung unterschiedlicher "Symbole", der besseren Unterscheidung wegen.
Vordere Scrollbar von FF 142, hintere von FF 144.
Wie man erkennen kann, wird der Farbverlauf des Scrollbarhintergunds [scrollbar background_color] umgesetzt.
Jedoch leider nicht der des "Schiebers" [thumb/slider]!
Was man auf dem Screenshot jetzt nicht sehen kann, die Pfeile für die horizontale Scrollbar werden
in der Version 144 nicht eingeblendet.
Auch wird der Farbverlauf so gar nicht umgesetzt, weder beim Hintergrund, noch beim "Schieber" [thumb/slider].
PS: Test ist mit dem Skript aus #14, wobei für die Version 144 die Anpassungen gemacht werden mussten.
Ob das wirklich einen Unterschied macht, weiß ich nicht. Aber was „geht auch so“ betrifft: Du fügst das CSS in deinem Script ja bereits als Agent Sheet ein, siehe Zeile 340 im Script aus Beitrag #32.
Sorry, da stehe ich jetzt wirklich auf'em Schlauch!
Ich hatte nur festgestellt, dass das eine Skript (aus Beitrag #14), mit den "Änderungen an den Selektoren", teilweise
den Farbverlauf umsetzt, und "mein" Skript eben nicht.
Da ich noch der Wurm drin!
Hab ich. Ergebnis: Bei einer horizontalen Scrollleiste erscheinen keine Pfeile...
Danke für die Fehlermeldung.
Da brauche ich noch gar nicht lange rummachen, liegt nicht am Skript.
Denn auch beim Original, mit den Änderungen, siehe unten, funktioniert es nicht!
Ich habe einmal gelesen, dass man dafür die Scrollbar-CSS mit den Rechten „Agent Sheet” aktivieren muss
Nein, das geht auch so! Der Fehler steckt im Skript!
Denn mit der Version von Endor, mit den Änderungen " [orient="xxx"] zu [xxx] " funktioniert der Farbverlauf ja zum Teil.
Hier nun mein überarbeitetes Skript!
Auch wenn ich den Code von den Symbolen eigentlich nicht ins Skript schreiben wollte,
musste ich es dennoch machen, weil ... , wegen des internen Codes.
Habe weitere Parameter aus dem originalen Skript eingebaut, und so lässt sich nun
die Scrollleiste z.B. auch schmal machen.
Probiert es aus und wenn etwas unklar ist, fragen!
Eine weniger schöne Sache muss ich aber noch erwähnen!
Der Farbverlauf funktioniert ab Firefox 143 nicht mehr. Warum? Ich weiß es nicht.
Bleibe aber dran![]()
// Scrollbar.uc.js
"use strict";
/* Firefox userChrome.js tweaks - 'Custom Scrollbars' for Firefox ************************************************************ */
/* Original by Aris (aris-addons@gmx.net)************************************************************************************* */
/* Github: https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/custom_scrollbars.uc.js
/* *************************************************************************************************************************** */
/* Customized by Mira********************************************************************************************************* */
/* https://www.camp-firefox.de/forum/thema/135133-custom-scrollbars-uc-js-anpassen/ ****************************************** */
/* Scrollbar.v1.0.6.js https://www.camp-firefox.de/forum/thema/135133/?postID=1207718#post1207718************************** */
/* https://www.camp-firefox.de/forum/thema/136152/?postID=1222989#post1222989************************************************* */
/* Scrollbar.v2.0.2.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223096#post1223096************************** */
/* Scrollbar.v2.0.3.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223124#post1223124************************** */
/* Scrollbar.v2.0.5.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223143#post1223143************************** */
/* Scrollbar.v2.0.6.1.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223162#post1223162************************** */
/* *************************************************************************************************************************** */
/* Custom Scrollbars for Firefox ********************************************************************************************* */
/* Version: 2.0.7 RC2 for Firefox 143+ *************************************************************************************** */
/* ******************************************************************************************************************************
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
[!] DER STARTUP-CACHE MUSS NACH JEDER ÄNDERUNG GELÖSCHT WERDEN!
-> Ordner 'startupCache' finden: Adressleiste > about:profiles > Lokales Verzeichnis > Ordner öffnen > startupCache
-> Firefox schließen
-> Inhalt des 'startupCache'-Ordners löschen
Alternativ mit einem JavaScipt!
-> https://github.com/Endor8/userChrome.js/blob/master/Firefox%2087/RestartFirefoxButtonM.uc.js
Anpassungen vornehmen > Werte ändern
- Optionen aktivieren/deaktivieren: true <-> false
- Farbe
- Name: red, blue, transparent
- Hexcode: #33CCFF, #FFF
- rgb(a): rgba(0,0,255,0.8)
- hsl(a): hsla(240,100%,50%,0.8)
- Zahlen: 1, 2, 3 ... 10, 11, 12 ...
- Deckkraft (in Dezimalzahlen): 0.0 bis 1.0 z.B. 1.4 oder 1.75
- Farbverläufe: linear-gradient(direction, color, color, color)
- Beispiel für Farbverläufe: linear-gradient(to right, blue, #33CCFF, rgba(0,0,255,0.8))
- vordefinierte Farbverläufe: transparent,rgba(255,255,255,0.5),transparent -> transparent,rgba(255,255,255,0.0),transparent
- keine Farbe oder keine Farbwerte -> verwende "unset"
*/
/* *************************************************************************************************************************** */
(function() {
// PROFILE PHATH "CALCULATE"
let ProfileDirectory = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons'));
// GENERAL SCROLLBAR SETTINGS
const custom_scrollbar_size_value = 17; // in px // default: custom_scrollbar_size_value = 17
// CUSTOM SCROLLBAR SETTINGS ("custom_scrollbar_" --> "cs_")
const custom_scrollbars = true; // default: custom_scrollbars = true
const custom_scrollbar_arrows = true; // default: custom_scrollbar_arrows = true
const custom_scrollbar_arrows_version = 1; // default: custom_scrollbar_arrows_version = 1
// 1 ==> SVG arrows as code: might not work on some pages
// 2 ==> SVG arrows as files: placed inside 'chrome\icons' folder
// only for 'custom_scrollbar_arrows_version = 1'
const custom_scrollbar_arrows_color = "%23bfbfbf"; // default: custom_scrollbar_arrows_color = "grey"; / # ==> %23 e.g. #33CCFF ==> %2333CCFF
const custom_scrollbar_arrows_hover_color = "%23ffae00"; // default: custom_scrollbar_arrows_hover_color = "orange"; # ==> %23
const cs_thumb_border = 1; // default: cs_thumb_border = 0 / in px 1
const cs_thumb_roundness = 9; // default: cs_thumb_roundness = 0 / in px 9
const cs_buttons_border = 0; // default: cs_buttons_border = 0 / in px
const cs_buttons_roundness = 0; // default: cs_buttons_roundness = 0 / in px
const cs_thumb_minimal_size = 12; // default: cs_thumb_minimal_size = 12; / in px
const cs_ignore_color_gradients = true; // default: cs_ignore_color_gradients = false / 'flat' scrollbars
// CUSTOM SCROLLBAR COLORS/GRADIENTS
// - background
const cs_background_color = "#5b5b66"; // default: cs_background_color = "#DDDDDD"
let cs_background_image_vertical = "linear-gradient(to right,transparent,rgba(255,0,0,0.5),transparent)"; // default: cs_background_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"
let cs_background_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,0,0,0.5),transparent)"; // default: cs_background_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
let cs_arrows_on_buttons_buttons_size = 1.0; // default: cs_arrows_on_buttons_buttons_size = 1.0
let cs_background_roundness = 0; // default: cs_background_roundness = 0 / in px
// - corner
const cs_corner_background_color = "#bfbfbf"; // default: cs_corner_background_color = "#DDDDDD" / - corner
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_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%)"
// - thumb/slider
const cs_thumb_color = "#bfbfbf"; // default: cs_thumb_color = "#33CCFF" / thumb/slider
let cs_thumb_image_vertical = "linear-gradient(to right,transparent,rgba(255,0,255,0.5),transparent)"; // default: cs_thumb_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"
let cs_thumb_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,0,255,0.5),transparent)"; // default: cs_thumb_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const cs_thumb_hover_color = "#ffae00"; // default: cs_thumb_hover_color = "#66FFFF"
let cs_thumb_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_thumb_hover_image_vertical = "linear-gradient(to right,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_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const cs_thumb_border_color = "#5b5b66"; // default: cs_thumb_border_color = "#33CCFF"
// - buttons
const cs_buttons_color = "#5b5b66"; // default: cs_buttons_color = "#66FFFF" "#5b5b66"/ buttons
let cs_buttons_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_buttons_image_vertical = "linear-gradient(to right,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_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const cs_buttons_hover_color = "#5b5b66"; // default: cs_buttons_hover_color = "#33CCFF"
const cs_buttons_border_color = "#5b5b66"; // default: cs_buttons_border_color = "#33CCFF" "#5b5b66"
let cs_buttons_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_buttons_hover_image_vertical = "linear-gradient(to right,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_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const hide_scrollbars = false; // default: hide_scrollbars = false
const hide_scrollbar_buttons = false; // default: hide_scrollbar_buttons = false
const thin_scrollbars = false; // default: thin_scrollbars = false / browsers own way to show thin scrollbars
const custom_scrollbar_opacity = true; // default: custom_scrollbar_opacity = false
const custom_opacity_value = "1.0"; // default: custom_opacity_value = "1.0"
/* *************************************************************************************************************************** */
// 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;
border-radius: ${cs_background_roundness}px !important;
}
scrollbar[horizontal] slider {
background-image: ${cs_background_image_horizontal} !important;
border-radius: ${cs_background_roundness}px !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 thumb[vertical] {
background-image: ${cs_thumb_image_vertical} !important;
min-height: ${(cs_thumb_minimal_size+cs_thumb_roundness+cs_thumb_border)}px !important;
}
scrollbar thumb[horizontal] {
background-image: ${cs_thumb_image_horizontal} !important;
min-width: ${(cs_thumb_minimal_size+cs_thumb_roundness+cs_thumb_border)}px !important;
}
scrollbar thumb:hover, scrollbar thumb:active {
background-color: ${cs_thumb_hover_color} !important;
}
scrollbar thumb[vertical]:hover, scrollbar thumb[vertical]:active {
background-image: ${cs_thumb_hover_image_vertical} !important;
}
scrollbar thumb[horizontal]:hover, scrollbar thumb[horizontal]: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[horizontal] scrollbarbutton {
background-image: ${cs_buttons_image_horizontal} !important;
}
scrollbar scrollbarbutton:hover {
background-image: ${cs_buttons_hover_color} !important;
}
scrollbar[vertical] scrollbarbutton:hover {
background-image: ${cs_buttons_hover_image_vertical} !important;
}
scrollbar[horizontal] 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;
}
/* arrow-up */
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='m8.352 5.001 5.466 5.465a.623.623 0 0 1-.001.884.628.628 0 0 1-.885 0L7.999 6.416l-4.932 4.933a.626.626 0 0 1-.885-.885L7.648 5l.704.001z'/%3E%3C/svg%3E ") !important;
}
/* arrow-down */
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='m8.352 10.999 5.466-5.465a.623.623 0 0 0-.001-.884.628.628 0 0 0-.885 0L7.998 9.585l-4.93-4.934a.626.626 0 0 0-.885.885L7.648 11l.704-.001z'/%3E%3C/svg%3E ") !important;
}
/* arrow-left */
scrollbar[horizontal] > 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='m5.001 8.352 5.465 5.466a.626.626 0 0 0 .884-.886L6.416 7.999l4.933-4.932a.626.626 0 0 0-.885-.885L5 7.647l.001.705z'/%3E%3C/svg%3E ") !important;
}
/* arrow-right */
scrollbar[horizontal] > 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='m10.999 8.352-5.465 5.466a.626.626 0 0 1-.884-.886l4.935-4.934-4.934-4.931a.626.626 0 0 1 .885-.885L11 7.647l-.001.705z'/%3E%3C/svg%3E ") !important;
}
/* arrow-up */
scrollbar[vertical] > scrollbarbutton[type="decrement"]:hover {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='${custom_scrollbar_arrows_hover_color}' %3E%3Cpath d='m8.352 5.001 5.466 5.465a.623.623 0 0 1-.001.884.628.628 0 0 1-.885 0L7.999 6.416l-4.932 4.933a.626.626 0 0 1-.885-.885L7.648 5l.704.001z'/%3E%3C/svg%3E ") !important;
}
/* arrow-down */
scrollbar[vertical] > scrollbarbutton[type="increment"]:hover {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='${custom_scrollbar_arrows_hover_color}' %3E%3Cpath d='m8.352 10.999 5.466-5.465a.623.623 0 0 0-.001-.884.628.628 0 0 0-.885 0L7.998 9.585l-4.93-4.934a.626.626 0 0 0-.885.885L7.648 11l.704-.001z'/%3E%3C/svg%3E ") !important;
}
/* arrow-left */
scrollbar[horizontal] > scrollbarbutton[type="decrement"]:hover {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='${custom_scrollbar_arrows_hover_color}' %3E%3Cpath d='m5.001 8.352 5.465 5.466a.626.626 0 0 0 .884-.886L6.416 7.999l4.933-4.932a.626.626 0 0 0-.885-.885L5 7.647l.001.705z'/%3E%3C/svg%3E ") !important;
}
/* arrow-right */
scrollbar[horizontal] > scrollbarbutton[type="increment"]:hover {
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='${custom_scrollbar_arrows_hover_color}' %3E%3Cpath d='m10.999 8.352-5.465 5.466a.626.626 0 0 1-.884-.886l4.935-4.934-4.934-4.931a.626.626 0 0 1 .885-.885L11 7.647l-.001.705z'/%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("${ProfileDirectory}/Pfeil-hoch_hellgrau.svg") !important;
}
scrollbar[vertical] > scrollbarbutton[type="increment"] {
background-image: url("${ProfileDirectory}/Pfeil-runter_hellgrau.svg") !important;
}
scrollbar[horizontal] > scrollbarbutton[type="decrement"] {
background-image: url("${ProfileDirectory}/Pfeil-links_hellgrau.svg") !important;
}
scrollbar[horizontal] > scrollbarbutton[type="increment"] {
background-image: url("${ProfileDirectory}/Pfeil-rechts_hellgrau.svg") !important;
}
/* hover */
scrollbar[vertical] > scrollbarbutton[type="decrement"]:hover {
background-image: url("${ProfileDirectory}/Pfeil-hoch_orange.svg") !important;
}
scrollbar[vertical] > scrollbarbutton[type="increment"]:hover {
background-image: url("${ProfileDirectory}/Pfeil-runter_orange.svg") !important; */
}
scrollbar[horizontal] > scrollbarbutton[type="decrement"]:hover {
background-image: url("${ProfileDirectory}/Pfeil-links_orange.svg") !important;
}
scrollbar[horizontal] > scrollbarbutton[type="increment"]:hover {
background-image: url("${ProfileDirectory}/Pfeil-rechts_orange.svg") !important;
}
scrollbar[vertical] > scrollbarbutton {
height: ${(custom_scrollbar_size_value*cs_arrows_on_buttons_buttons_size)}px !important;
max-width: ${custom_scrollbar_size_value}px !important;
}
scrollbar[horizontal] > scrollbarbutton {
width: ${(custom_scrollbar_size_value*cs_arrows_on_buttons_buttons_size)}px !important;
max-height: ${custom_scrollbar_size_value}px !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[horizontal] 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[horizontal] 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
lenny2 Bitte die Konfiguration, die Du im Skript von Aris verwendet hast![]()
Ah, ok.
Und mit Aris original Skript funktioniert es?
Bzw. mit diesem => RE: Skript zum Anpassen der Scrollbar funktioniert nicht mehr richtig
Danke für das Feedback.
.... , mit Ausnahme des Farbverlaufs.
Das meinte ich mit 3-D-Effekt.
Außerdem funktionieren beide Skripte ....
Welche beiden Skripte?
... nicht mehr in den Ordnern der Lesezeichenleiste ...
Dazu kann ich absolut nichts "sagen"! Ich hatte bisher nicht das Problem, bzw. so viele Lesezeichen, dass da irgendwo
eine Scrollbar auftauchte.
Bräuchte mal ein Bild dazu, Version 142 und 143+
Verlinke bitte mal zum Thread, wo Du das Skript gepostet hast.
Stelle hier mal meine Version des Appmenu.uc.js vor.
// ==UserScript==
// @name Appmenu.uc.js
// @namespace Appmenu@gmail.com
// @description Basiert auf dem Script externalFuncButtonM.uc.js, Wiederherstellung der Orangenen FF-Menü Schaltfläche
// @include main
// @version update for Firefox 68+ by aborix
// @author defpt
// @charset UTF-8
// @version 2020.07.13 Weitere Menüs und Funktionen ergänzt by bege
// @version 2024.08.10 alle Einstellungen im Abschnitt Konfiguration vornehmen
// @version 2024.08.18 einige Veränderungen am Skript, Symbole, Funktionen & Menüs by Mira Bellenbaum
// @version 2025.01.15 EventListener korrigiert und angepasst, by Mira Bellenbaum
// @version 2025.04.03 Zeile 340 "eval()" ersetzt. Nachfolgend Zeilen 381-416 ergänzt und Parameter (command:) angepasst
// @version 2025.07.21 Zeile 239 geändert! Button weiter nach rechts!
// ==/UserScript==
// Definiere den Profilpfad
let ProfilePath = PathUtils.toFileURI(
PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')
);
var Appmenu = {
// ■■ START UserConfiguration ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
// Editor mit angegebenem Pfad verwenden
// editor: 'C:\\Program Files\\Notepad++\\notepad++.exe',
editor: "C:\\Program Files\\Microsoft VS Code\\Code.exe",
// oder
// in 'view_source.editor.path' eingetragenen Editor verwenden
editor: Services.prefs.getCharPref('view_source.editor.path'),
// Dateimanager mit angegebenem Pfad verwenden oder leer ('') wenn System-Dateimanager verwenden
//fileManager: 'C:\\Program files\\FreeCommander XE\\FreeCommander.exe',
fileManager: "",
// Parameter für Dateimanager oder leer ('')
//FMParameter: '/T',
FMParameter: "",
// Submenüs ohne Inhalt im Hauptmenü automatisch ausblenden
autohideEmptySubDirs: true,
// Submenüs im Hauptmenü nach unten verschieben
moveSubDirstoBottom: false,
// Ort und Aussehen des Menü-Buttons einstellen
isUrlbar: 2, // 0: TabsToolbar; 1: navbar; 2: toolbar-menubar
isButton: 0, // 0: Hamburger,klein; 1: Firefox,groß,
// Hotkey zum Öffnen des Appmenüs oder leer ('')
hotkey: "f",
hotkeyModifier: "alt",
// ■■ END UserConfiguration ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
// Submenüs im Hauptmenü nach unten verschieben
subdirPopupHash: [],
subdirMenuHash: [],
toolbar: {
// Submenüs des Hauptmenüs definieren; Separator einfügen mit {name: 'separator'}
subdirs: [
{
name: 'Firefox Verzeichnisse',
image: `${ProfilePath}/folder_currentColor.svg`, // Der Pfad wird direkt verwendet, ohne `url()`
},
{
name: 'Firefox Funktionen',
image: `${ProfilePath}/settings_currentColor.svg`, // Der Pfad wird direkt verwendet, ohne 'url()'
},
{
name: 'separator',
},
],
apps: [
// Untermenü Firefox Verzeichnisse
{
name: 'Profil-Verzeichnis',
id: 'AMProfil',
root: 'ProfD',
path: '\\',
subdir: 'Firefox Verzeichnisse',
},
{
name: 'Chrome-Ordner',
id: 'AMchrome',
root: 'ProfD',
path: '\\chrome',
subdir: 'Firefox Verzeichnisse',
},
{
name: 'CSS-Ordner',
id: 'AMCSS',
root: 'ProfD',
path: '\\chrome\\css',
subdir: 'Firefox Verzeichnisse',
},
{
name: 'JS-Ordner',
id: 'AMJS',
root: 'ProfD',
path: '\\chrome\\scripts',
subdir: 'Firefox Verzeichnisse',
},
{
name: 'Addon-Verzeichnis',
id: 'AMAddons',
root: 'ProfD',
path: '\\extensions',
subdir: 'Firefox Verzeichnisse',
},
{
name: 'Programm-Verzeichnis',
id: 'AMProgramm',
root: 'CurProcD',
path: '\\',
subdir: 'Firefox Verzeichnisse',
},
{
name: 'Startup-Cache',
id: 'AMCache',
root: 'ProfLD',
path: '\\startupCache',
subdir: 'Firefox Verzeichnisse',
},
],
configs: [
// Untermenü Firefox Funktionen
{
name: 'Anpassen',
id: 'AMAnpassen',
command: 'gCustomizeMode.enter()',
subdir: 'Firefox Funktionen',
},
{
name: 'Neustart im abgesicherten Modus',
id: 'AMModus',
command: 'safeModeRestart();',
subdir: 'Firefox Funktionen',
},
{
name: 'Browser-Konsole',
id: 'AMKonsole',
command: 'goKonsole',
subdir: 'Firefox Funktionen',
},
{
name: 'Browser-Werkzeuge',
id: 'AMWerkzeuge',
command: 'goWerkzeuge',
subdir: 'Firefox Funktionen',
},
{
name: 'Web-Entwickler',
id: 'AMEntwickler',
command: 'goEntwickler',
subdir: 'Firefox Funktionen',
},
{
name: 'Firefox synchronisieren',
id: 'AMsynchron',
command: 'gSync',
subdir: 'Firefox Funktione',
},
{
name: 'Zugangsdaten und Passwörter',
id: 'AMdaten',
command:
'LoginHelper.openPasswordManager(window, { entryPoint: "mainmenu" })',
tooltiptext: 'about:logins',
subdir: 'Firefox Funktionen',
},
{
name: 'Task Manager',
id: 'AMManager',
command: 'switchToTabHavingURI("about:processes", true)',
tooltiptext: 'about:processes',
subdir: 'Firefox Funktionen',
},
{
name: 'Offline arbeiten',
id: 'AMOffline',
command: 'BrowserOffline.toggleOfflineStatus();',
subdir: 'Firefox Funktionen',
},
/*
{
name: 'separator',
},
*/
{
name: 'Neustart',
id: 'AMreboot',
tooltiptext: 'userChrome.js-Cache wird geleert',
command: 'goReeboot',
},
{
name: 'Beenden',
id: 'AMquit',
command: 'goQuitApplication(event);',
},
]
},
_externalAppPopup: null,
_isready: false,
init: function() {
this.handleRelativePath(this.toolbar.apps);
const XULNS = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';
var ExternalAppBtn = document.createElementNS(XULNS, 'toolbarbutton');
ExternalAppBtn.id = 'AppMenuButton';
ExternalAppBtn.setAttribute('label', 'AppButton');
ExternalAppBtn.addEventListener('click', event => {
event.preventDefault();
event.stopPropagation();
});
ExternalAppBtn.setAttribute('tooltiptext', 'Firefox Menü');
ExternalAppBtn.setAttribute('type', 'menu');
ExternalAppBtn.setAttribute('removable', 'true');
// Definiere den Profilpfad
let ProfilePath = PathUtils.toFileURI(
PathUtils.join(PathUtils.profileDir, 'chrome', 'image')
);
// Symbole
let DefaultIcon = 'Button_groß.png';
let AlternateIcon = 'Button_klein-5.png';
// Wenn Appmenu.isButton true ist, benutze das große Symbol, sonst das kleine
if (Appmenu.isButton) {
ExternalAppBtn.style.listStyleImage = `url('${ProfilePath}/${DefaultIcon}')`; // Großes Symbol
ExternalAppBtn.style.width = '94px'; // Feste Breite für großes Symbol
ExternalAppBtn.style.height = '24px'; // Feste Höhe für großes Symbol
} else {
ExternalAppBtn.style.listStyleImage = `url('${ProfilePath}/${AlternateIcon}')`; // Kleines Symbol
//ExternalAppBtn.style.width = "16px"; // Feste Breite für kleines Symbol
//ExternalAppBtn.style.width = '26px';
ExternalAppBtn.style.width = '50px';
ExternalAppBtn.style.height = '21px'; // Feste Höhe für kleines Symbol
}
// Button in die richtige Toolbar einfügen
if (Appmenu.isUrlbar === 1) {
var navBar = document.getElementById('nav-bar-customization-target');
navBar.insertBefore(ExternalAppBtn, navBar.firstChild);
} else if (Appmenu.isUrlbar === 2) {
var menubar = document.getElementById('toolbar-menubar');
menubar.insertBefore(ExternalAppBtn, menubar.firstChild);
} else {
var TabsToolbar = document.getElementById('TabsToolbar');
TabsToolbar.insertBefore(ExternalAppBtn, TabsToolbar.firstChild);
}
var ExternalAppPopup = document.createElementNS(XULNS, 'menupopup');
ExternalAppPopup.addEventListener('click', event => {
event.stopPropagation();
});
ExternalAppPopup.setAttribute('id', 'AMpopup');
this._externalAppPopup = ExternalAppPopup;
ExternalAppBtn.appendChild(ExternalAppPopup);
Appmenu.onpopupshowing();
// Menü mit Tastaturkürzel öffnen
if (Appmenu.hotkey) {
let key = document.createXULElement('key');
key.id = 'key_AppMenuPopup';
key.setAttribute('key', Appmenu.hotkey);
if (Appmenu.hotkeyModifier)
key.setAttribute('modifiers', Appmenu.hotkeyModifier);
key.addEventListener('command', function () {
document.getElementById('AMpopup').openPopup();
});
document.getElementById('mainKeyset').appendChild(key);
}
},
onpopupshowing: function() {
if (this._isready) return;
if (this._externalAppPopup === null) return;
var ExternalAppPopup = this._externalAppPopup;
// Verarbeitung der Subdirs
for (let subdir of this.toolbar.subdirs) {
if (subdir.name == 'separator') {
ExternalAppPopup.appendChild(document.createXULElement('menuseparator'));
} else {
var subdirItem = ExternalAppPopup.appendChild(document.createXULElement('menu'));
var subdirItemPopup = subdirItem.appendChild(document.createXULElement('menupopup'));
subdirItem.setAttribute('class', 'menu-iconic');
subdirItem.setAttribute('label', subdir.name);
subdirItem.setAttribute('image', subdir.image);
Appmenu.subdirPopupHash[subdir.name] = subdirItemPopup;
Appmenu.subdirMenuHash[subdir.name] = subdirItem;
}
}
// Verarbeitung der Apps
for (let app of this.toolbar.apps) {
var appItem;
if (app.name == 'separator') {
appItem = document.createXULElement('menuseparator');
} else {
appItem = document.createXULElement('menuitem');
appItem.setAttribute('class', 'menuitem-iconic');
appItem.setAttribute('label', app.name);
appItem.setAttribute('image', app.image);
appItem.addEventListener('command', function () {
Appmenu.exec(this.path, this.args);
});
appItem.setAttribute('tooltiptext', app.name);
appItem.path = app.path;
appItem.args = app.args;
}
if (app.subdir && Appmenu.subdirPopupHash[app.subdir])
Appmenu.subdirPopupHash[app.subdir].appendChild(appItem);
else ExternalAppPopup.appendChild(appItem);
}
// Verarbeitung der Configs
for (let config of this.toolbar.configs) {
var configItem;
if (config.name == 'separator') {
configItem = document.createXULElement('menuseparator');
} else {
configItem = ExternalAppPopup.appendChild(document.createXULElement('menuitem'));
configItem.setAttribute('class', 'menuitem-iconic');
configItem.setAttribute('label', config.name);
configItem.setAttribute('image', config.image);
configItem.addEventListener('command', () => {
Appmenu.executeCommand(config.command);
});
if (config.tooltiptext) {
configItem.setAttribute('tooltiptext', config.tooltiptext);
} else {
configItem.setAttribute('tooltiptext', config.name);
}
configItem.setAttribute('id', config.id);
}
if (config.subdir && Appmenu.subdirPopupHash[config.subdir]) {
Appmenu.subdirPopupHash[config.subdir].appendChild(configItem);
} else {
ExternalAppPopup.appendChild(configItem);
}
}
if (this.autohideEmptySubDirs) {
for (let i = 0; i < Appmenu.subdirPopupHash.length; i++) {
if (Appmenu.subdirPopupHash[i].hasChildNodes()) {
continue;
} else {
Appmenu.subdirMenuHash[i].setAttribute('hidden', 'true');
}
}
}
if (this.moveSubDirstoBottom) {
let i = ExternalAppPopup.childNodes.length;
while (ExternalAppPopup.firstChild.getAttribute('class') != 'menuitem-iconic' && i-- != 0) {
ExternalAppPopup.appendChild(ExternalAppPopup.firstChild);
}
}
this._isready = true;
},
executeCommand: function(command) {
const commandMap = {
'gCustomizeMode.enter()': () => gCustomizeMode.enter(),
'safeModeRestart();': () => safeModeRestart(),
'goKonsole': () => {
var { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});
var { BrowserConsoleManager } = require('resource://devtools/client/webconsole/browser-console-manager');
BrowserConsoleManager.openBrowserConsoleOrFocus();
},
'goWerkzeuge': () => {
var { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});
var { BrowserToolboxLauncher } = require('resource://devtools/client/framework/browser-toolbox/Launcher.sys.mjs');
BrowserToolboxLauncher.init();
},
'goEntwickler': () => {
var { require } = ChromeUtils.importESModule('resource://devtools/shared/loader/Loader.sys.mjs', {});
var { gDevToolsBrowser } = require('resource://devtools/client/framework/devtools-browser');
gDevToolsBrowser.toggleToolboxCommand(window.gBrowser, Cu.now());
},
'gSync': () => gSync.openPrefs('menubar'),
'LoginHelper.openPasswordManager(window, { entryPoint: "mainmenu" })': () => LoginHelper.openPasswordManager(window, { entryPoint: 'mainmenu' }),
'switchToTabHavingURI("about:processes", true)': () => switchToTabHavingURI('about:processes', true),
'BrowserOffline.toggleOfflineStatus();': () => BrowserOffline.toggleOfflineStatus(),
'goReeboot': () => {
Services.appinfo.invalidateCachesOnRestart();
Services.startup.quit(Ci.nsIAppStartup.eRestart | Ci.nsIAppStartup.eAttemptQuit);
},
'goQuitApplication(event);': () => goQuitApplication(event),
};
if (commandMap[command]) {
commandMap[command]();
} else {
console.warn('Unbekannter Befehl: ', command);
}
},
handleRelativePath: function(apps) {
for (let app of apps) {
if (app.path) {
app.path = app.path.replace(/\//g, '\\');
var ffdir = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get(app.root, Ci.nsIFile).path;
if (/^(\\)/.test(app.path)) {
app.path = ffdir + app.path;
}
}
}
},
exec: function(path, args) {
args = args || [];
var args_t = args.slice(0);
for (let arg of args_t) {
arg = arg.replace(/%u/g, gBrowser.currentURI.spec);
}
var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
file.initWithPath(path);
if (!file.exists()) {
alert('Datei nicht gefunden: ' + path);
return;
}
if (file.isExecutable() && !path.endsWith('.js')) {
var process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
process.init(file);
process.run(false, args_t, args_t.length);
} else if (file.isFile()) {
if (this.editor) {
let UI = Cc['@mozilla.org/intl/scriptableunicodeconverter'].createInstance(Ci.nsIScriptableUnicodeConverter);
UI.charset = window.navigator.platform.toLowerCase().includes('win') ? 'Shift_JIS' : 'UTF-8';
let path = UI.ConvertFromUnicode(file.path);
let app = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
app.initWithPath(this.editor);
let process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
process.init(app);
process.run(false, [path], 1);
} else {
file.launch();
}
} else if (file.isDirectory()) {
if (this.fileManager) {
let args=[this.FMParameter,path];
let app = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
app.initWithPath(this.fileManager);
let process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
process.init(app);
process.run(false, args, args.length);
} else {
file.launch();
}
}
},
};
(function () {
// Definiere den Profilpfad für die Symbole
let ProfilePath = PathUtils.toFileURI(
PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')
);
// Standard-Symbol-Dateiname
let ButtonIcon01 = 'restart.svg';
let ButtonIcon02 = 'quit.svg';
let Icon01 = 'profile.svg';
let Icon02 = 'chrome.svg';
let Icon03 = 'css4.svg';
let Icon04 = 'js.svg';
let Icon05 = 'addons.svg';
let Icon06 = 'folder.svg';
let Icon07 = 'folder-1.svg';
let Icon11 = 'Themes.svg';
let Icon12 = 'debugging-workers.svg';
let Icon13 = 'command-console.svg';
let Icon14 = 'window-dev-tools.svg';
let Icon15 = 'developer.svg';
let Icon16 = 'sync.svg';
let Icon17 = 'passwords.svg';
let Icon18 = 'performance.svg';
let Icon19 = 'plug-disconnected.svg';
// StyleSheetService zum Hinzufügen der CSS-Regeln
let sss = Components.classes['@mozilla.org/content/style-sheet-service;1'].getService(Components.interfaces.nsIStyleSheetService);
let uri = Services.io.newURI(
'data:text/css;charset=utf-8,' +
encodeURIComponent(`
#AMpopup { margin-left: 8px !important; }
menuitem[label='Profil-Verzeichnis'] { background-image: url('${ProfilePath}/${Icon01}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important; /* Größe des Symbols anpassen */
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
menuitem[label='Chrome-Ordner'] { background-image: url('${ProfilePath}/${Icon02}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important; /* Größe des Symbols anpassen */
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
menuitem[label='CSS-Ordner'] { background-image: url('${ProfilePath}/${Icon03}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important; /* Größe des Symbols anpassen */
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
menuitem[label='JS-Ordner'] { background-image: url('${ProfilePath}/${Icon04}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important; /* Größe des Symbols anpassen */
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
menuitem[label='Addon-Verzeichnis'] { background-image: url('${ProfilePath}/${Icon05}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16pxx !important; /* Größe des Symbols anpassen */
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
menuitem[label='Programm-Verzeichnis'] { background-image: url('${ProfilePath}/${Icon06}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important; /* Größe des Symbols anpassen */
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
menuitem[label='Startup-Cache'] { background-image: url('${ProfilePath}/${Icon07}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important; /* Größe des Symbols anpassen */
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
#AMAnpassen { background-image: url('${ProfilePath}/${Icon11}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
#AMModus { background-image: url('${ProfilePath}/${Icon12}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
#AMKonsole { background-image: url('${ProfilePath}/${Icon13}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
#AMWerkzeuge { background-image: url('${ProfilePath}/${Icon14}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
#AMEntwickler { background-image: url('${ProfilePath}/${Icon15}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
#AMsynchron { background-image: url('${ProfilePath}/${Icon16}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
#AMdaten { background-image: url('${ProfilePath}/${Icon17}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
#AMManager { background-image: url('${ProfilePath}/${Icon18}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
#AMOffline { background-image: url('${ProfilePath}/${Icon19}');
background-repeat: no-repeat !important;
background-position: 11px 3px !important;
background-size: 16px 16px !important;
-moz-context-properties: fill, fill-opacity;
fill: currentColor;
}
/* Neustart-Button */
#AMreboot {
background-image: url('${ProfilePath}/${ButtonIcon01}');
background-repeat: no-repeat !important;
background-position: 10px 2px !important;
background-size: 20px 20px !important; /* Größe des Symbols anpassen */
padding-left: 10px !important; /* Platz für das Symbol lassen */
-moz-context-properties: fill, fill-opacity !important;
fill: #fbc96e !important;
}
/* Beenden-Button */
#AMquit {
background-image: url('${ProfilePath}/${ButtonIcon02}');
background-repeat: no-repeat !important;
background-position: 12px 3px !important;
background-size: 16px 16px !important; /* Größe des Symbols anpassen */
padding-left: 10px !important; /* Platz für das Symbol lassen */
-moz-context-properties: fill, fill-opacity !important;
fill: red !important;
}
`),
null,
null
);
// CSS-Regeln registrieren
sss.loadAndRegisterSheet(uri, sss.AUTHOR_SHEET);
})();
if (window.gBrowser) Appmenu.init();
Alles anzeigen
![]()
![]()
So, grundsätzlich funktioniert meine Version des Skriptes nun auch ab FF 143![]()
Was, so glaube ich, noch nicht richtig funktioniert, ist der 3-D-Effekt!
linear-gradient( .... )
Da bin ich noch dran.
Auch werde ich die Fallbackoptionen von Aris doch wieder in meine Version übernehmen.
Nicht jeder mag unter seinem Profil die Grafiken abspeichern.
ABER, ich werde mir da was einfallen lassen, denn das Laden von externen Daten mag ich so gar nicht.
Hier nun meine derzeitige Version.
// Scrollbar.uc.js
"use strict";
/* Firefox userChrome.js tweaks - 'Custom Scrollbars' for Firefox ************************************************************ */
/* Original by Aris (aris-addons@gmx.net)************************************************************************************* */
/* Github: https://github.com/Aris-t2/CustomJSforFx/blob/master/scripts/custom_scrollbars.uc.js
/* *************************************************************************************************************************** */
/* Customized by Mira********************************************************************************************************* */
/* https://www.camp-firefox.de/forum/thema/135133-custom-scrollbars-uc-js-anpassen/ ****************************************** */
/* Scrollbar.v1.0.6.js https://www.camp-firefox.de/forum/thema/135133/?postID=1207718#post1207718************************** */
/* https://www.camp-firefox.de/forum/thema/136152/?postID=1222989#post1222989************************************************* */
/* Scrollbar.v2.0.2.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223096#post1223096************************** */
/* Scrollbar.v2.0.3.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223124#post1223124************************** */
/* Scrollbar.v2.0.5.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223143#post1223143************************** */
/* Scrollbar.v2.0.6.1.js https://www.camp-firefox.de/forum/thema/136167/?postID=1223162#post1223162************************** */
/* *************************************************************************************************************************** */
/* Custom Scrollbars for Firefox ********************************************************************************************* */
/* Version: 2.0.7 for Firefox 143+ ***************************************************************************************** */
/* ******************************************************************************************************************************
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
[!] DER STARTUP-CACHE MUSS NACH JEDER ÄNDERUNG GELÖSCHT WERDEN!
-> Ordner 'startupCache' finden: Adressleiste > about:profiles > Lokales Verzeichnis > Ordner öffnen > startupCache
-> Firefox schließen
-> Inhalt des 'startupCache'-Ordners löschen
Alternativ mit einem JavaScipt!
-> https://github.com/Endor8/userChrome.js/blob/master/Firefox%2087/RestartFirefoxButtonM.uc.js
Anpassungen vornehmen > Werte ändern
- Optionen aktivieren/deaktivieren: true <-> false
- Farbe
- Name: red, blue, transparent
- Hexcode: #33CCFF, #FFF
- rgb(a): rgba(0,0,255,0.8)
- hsl(a): hsla(240,100%,50%,0.8)
- Zahlen: 1, 2, 3 ... 10, 11, 12 ...
- Deckkraft (in Dezimalzahlen): 0.0 bis 1.0 z.B. 1.4 oder 1.75
- Farbverläufe: linear-gradient(direction, color, color, color)
- Beispiel für Farbverläufe: linear-gradient(to right, blue, #33CCFF, rgba(0,0,255,0.8))
- vordefinierte Farbverläufe: transparent,rgba(255,255,255,0.5),transparent -> transparent,rgba(255,255,255,0.0),transparent
- keine Farbe oder keine Farbwerte -> verwende "unset"
*/
/* *************************************************************************************************************************** */
(function() {
// PROFILE PHATH "CALCULATE"
let ProfileDirectory = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons'));
// GENERAL SCROLLBAR SETTINGS
const custom_scrollbar_size_value = 17; // in px // default: custom_scrollbar_size_value = 17
// CUSTOM SCROLLBAR SETTINGS ("custom_scrollbar_" --> "cs_")
const custom_scrollbars = true; // default: custom_scrollbars = true
const custom_scrollbar_arrows = true; // default: custom_scrollbar_arrows = true
const cs_thumb_border = 1; // default: cs_thumb_border = 0 / in px 1
const cs_thumb_roundness = 9; // default: cs_thumb_roundness = 0 / in px 9
const cs_buttons_border = 0; // default: cs_buttons_border = 0 / in px
const cs_buttons_roundness = 0; // default: cs_buttons_roundness = 0 / in px
const cs_thumb_minimal_size = 12; // default: cs_thumb_minimal_size = 12; / in px
const cs_ignore_color_gradients = true; // default: cs_ignore_color_gradients = false / 'flat' scrollbars
// CUSTOM SCROLLBAR COLORS/GRADIENTS
// - background
const cs_background_color = "#DDDDDD"; // default: cs_background_color = "#DDDDDD"
let cs_background_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_background_image_vertical = "linear-gradient(to right,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_background_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
let cs_arrows_on_buttons_buttons_size = 1.0; // default: cs_arrows_on_buttons_buttons_size = 1.0
// - corner
const cs_corner_background_color = "#DDDDDD"; // default: cs_corner_background_color = "#DDDDDD" / - corner
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_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%)"
// - thumb/slider
const cs_thumb_color = "#33CCFF"; // default: cs_thumb_color = "#33CCFF" / thumb/slider
let cs_thumb_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_thumb_image_vertical = "linear-gradient(to right,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_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const cs_thumb_hover_color = "#66FFFF"; // default: cs_thumb_hover_color = "#66FFFF"
let cs_thumb_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_thumb_hover_image_vertical = "linear-gradient(to right,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_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const cs_thumb_border_color = "#33CCFF"; // default: cs_thumb_border_color = "#33CCFF"
// - buttons
const cs_buttons_color = "#66FFFF"; // default: cs_buttons_color = "#66FFFF" "#5b5b66"/ buttons
let cs_buttons_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_buttons_image_vertical = "linear-gradient(to right,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_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
const cs_buttons_hover_color = "#33CCFF"; // default: cs_buttons_hover_color = "#33CCFF"
const cs_buttons_border_color = "#33CCFF"; // default: cs_buttons_border_color = "#33CCFF" "#5b5b66"
let cs_buttons_hover_image_vertical = "linear-gradient(to right,transparent,rgba(255,255,255,0.5),transparent)"; // default: cs_buttons_hover_image_vertical = "linear-gradient(to right,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_hover_image_horizontal = "linear-gradient(to bottom,transparent,rgba(255,255,255,0.5),transparent)"
/* *************************************************************************************************************************** */
// 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='';
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[horizontal] 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 thumb[vertical] {
background-image: ${cs_thumb_image_vertical} !important;
min-height: ${(cs_thumb_minimal_size+cs_thumb_roundness+cs_thumb_border)}px !important;
}
scrollbar thumb[horizontal] {
background-image: ${cs_thumb_image_horizontal} !important;
min-width: ${(cs_thumb_minimal_size+cs_thumb_roundness+cs_thumb_border)}px !important;
}
scrollbar thumb:hover, scrollbar thumb:active {
background-color: ${cs_thumb_hover_color} !important;
}
scrollbar thumb[vertical]:hover, scrollbar thumb[vertical]:active {
background-image: ${cs_thumb_hover_image_vertical} !important;
}
scrollbar thumb[horizontal]:hover, scrollbar thumb[horizontal]: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[horizontal] 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[horizontal] scrollbarbutton:hover {
background-image: ${cs_buttons_hover_image_horizontal} !important;
}
`;
// if(custom_scrollbar_arrows === true && custom_scrollbar_arrows_version === 1)
if(custom_scrollbar_arrows === true)
custom_scrollbar_arrows_code=`
scrollbarbutton[type="increment"],
scrollbar[vertical] scrollbarbutton[type="decrement"],
scrollbarbutton[type="increment"],
scrollbar[horizontal] scrollbarbutton[type="decrement"] {
background-repeat: no-repeat;
/* background-position: center !important; */
}
scrollbar[vertical] > scrollbarbutton[type="decrement"] {
background-image: url("${ProfileDirectory}/Pfeil-hoch_hellgrau.svg") !important;
/* background-position: top !important; */
}
scrollbar[vertical] > scrollbarbutton[type="increment"] {
background-image: url("${ProfileDirectory}/Pfeil-runter_hellgrau.svg") !important;
/* background-position: bottom !important; */
}
scrollbar[horizontal] > scrollbarbutton[type="decrement"] {
background-image: url("${ProfileDirectory}/Pfeil-links_hellgrau.svg") !important;
/* background-position: left !important; */
}
scrollbar[horizontal] > scrollbarbutton[type="increment"] {
background-image: url("${ProfileDirectory}/Pfeil-rechts_hellgrau.svg") !important;
/* background-position: right !important; */
}
/* hover */
scrollbar[vertical] > scrollbarbutton[type="decrement"]:hover {
background-image: url("${ProfileDirectory}/Pfeil-hoch_orange.svg") !important;
}
scrollbar[vertical] > scrollbarbutton[type="increment"]:hover {
background-image: url("${ProfileDirectory}/Pfeil-runter_orange.svg") !important;
}
scrollbar[horizontal] > scrollbarbutton[type="decrement"]:hover {
background-image: url("${ProfileDirectory}/Pfeil-links_orange.svg") !important;
}
scrollbar[horizontal] > scrollbarbutton[type="increment"]:hover {
background-image: url("${ProfileDirectory}/Pfeil-rechts_orange.svg") !important;
}
scrollbar[vertical] > scrollbarbutton {
height: ${(custom_scrollbar_size_value*cs_arrows_on_buttons_buttons_size)}px !important;
max-width: ${custom_scrollbar_size_value}px !important;
}
scrollbar[horizontal] > scrollbarbutton {
width: ${(custom_scrollbar_size_value*cs_arrows_on_buttons_buttons_size)}px !important;
max-height: ${custom_scrollbar_size_value}px !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}
`), null, null),
Components.classes["@mozilla.org/content/style-sheet-service;1"]
.getService(Components.interfaces.nsIStyleSheetService).AGENT_SHEET);
})()
Alles anzeigen