auch das ↑ Script funktioniert hier nicht mehr.
Ach, nee. Das war ja auch nur ein Testskript!
Aber mal davon abgesehen, schrieb ich im anderen Thread, dass meine Skripte alle gleich aufgebaut sind!
Hier das Aktuelle!
JavaScript
// QuickLinkButton-about:about.uc.js = Button_for_QuickLinks-about.uc.js
// Das Script erstellt einen Button, der einen Tab öffnet mit den Links zu verschiedenen "about:"-Seiten.
// Source file https://www.camp-firefox.de/forum/thema/140072/?postID=1282691#post1282691
/* ----------------------------------------------------------------------------------- */
/* Zu beachten ist, dass die Grafiken sich im richtigen Ordner befinden müssen */
/* %appdata%\Mozilla\Firefox\Profiles\"Profilname"\chrome\icons */
/* ----------------------------------------------------------------------------------- */
(function() {
if (!window.gBrowser)
return;
const
// ■■ START UserConfiguration ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
id = 'link-button-about', // Id des Buttons
link = 'about:about', // Linkziel des Buttons
label = 'Quicklink: about:about', // Bezeichnung des Buttons
tooltiptext = 'Quicklink:\nabout:about',
// Icon-------------------------------------------------------
icon = 'firefox.svg', // [Name.Dateiendung] des Symbols
iconPath = '/chrome/icons/', // Pfad zum Ordner der das Icon beinhaltet
// ■■ END UserConfiguration ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
curProfDir = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir));
if (Services.prefs.getBoolPref('svg.context-properties.content.enabled') == false) {
Services.prefs.setBoolPref('svg.context-properties.content.enabled', true );
}
//BUTTON
try {
CustomizableUI.createWidget({
id: id,
defaultArea: CustomizableUI.AREA_NAVBAR,
label: label,
tooltiptext: tooltiptext,
onCreated: (button) => {
button.style.MozContextProperties = 'fill, stroke, fill-opacity';
button.style.listStyleImage = 'url("' + curProfDir + iconPath + icon + '")';
button.style.minWidth = 'fit-content';
button.style.fill = '#f1b508'; // Farbe für das SVG-Icon setzen
}
});
} catch(e) {};
// click
(function add_button() {
const button = document.getElementById(id);
if (button) {
button.addEventListener('click', (event) => {
if (event.button === 0) {
event.target.ownerGlobal.openTrustedLinkIn(link, "tab");
}
});
} else {
setTimeout(add_button, 100);
}
})();
})();
Alles anzeigen
Musst Du Dir halt anpassen! Text und/oder Symbol.
Und im angegebenen Link im Header, sind auch alle anderen Skripte,
wenn Du noch andere Buttons von mir verwendest![]()