1. Nachrichten
  2. Forum
    1. Unerledigte Themen
    2. Forenregeln
  3. Spenden
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. camp-firefox.de
  2. Mitleser

Beiträge von Mitleser

  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mitleser
    • 4. Juni 2024 um 22:01

    Danke!

    Das Icon funzt, das Label noch nicht..

    [function updateMenuItem()]

    Aber dies funzt (Zeile11):

    Statt:

    JavaScript
    // Funktion zum Aktualisieren des Labels und Icons
        function updateMenuItem() {
            const starred = orig.getAttribute('starred');
                if (starred == '') {
                menuitem1.setAttribute('label', 'funzt');
                } else if (starred == "null") {
              menuitem1.setAttribute('label', label1);
                } else if (starred == "true") {
              menuitem1.setAttribute('label', label2);
                } else {
              menuitem1.setAttribute('label', 'funzt nicht');
            }
    Alles anzeigen

    Dies:

    JavaScript
    // Funktion zum Aktualisieren des Labels und Icons
        function updateMenuItem() {
            const starred = orig.getAttribute('starred');
                if (starred == '') {
                menuitem1.setAttribute('label', 'funzt');
                } else if (starred == "null") {
              menuitem1.setAttribute('label', label1);
                } else if (starred == "true") {
              menuitem1.setAttribute('label', label2);
                } else {
              menuitem1.setAttribute('label', label1);
            }
    Alles anzeigen

    Bilder

    • neu.png
      • 19,65 kB
      • 269 × 225
  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mitleser
    • 4. Juni 2024 um 21:36

    Mira_Belle Bestimmt ist morgen dein Tag!
    An deinem heutigen schlechten Tag kann ich nichts ändern, aber wenn dir ab morgen langweilig ist, baue doch einfach den 'MutationObserver' in das oben erwähnte Script ein. Du kannst das! Mit der Beschäftigung mit dem o.a. Script würdest du auch meiner Erklärung näherkommen.....


    Dein 'Nachtrag' und mein Beitrag #3.837scheinen sich überschnitten zu haben.

  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mitleser
    • 4. Juni 2024 um 19:20

    Mira_Belle Kann es sein dass du mich veräppelst?:)
    Meine 'Aufgabenstellung'(wird demnächst mit 'MutationObserver' gelöst werden): Einen 'EventListener' der in der Lage ist, ein Attribut einer ID auf Veränderung zu prüfen, um eine Funktion anzustoßen
    [konkret: #context-bookmarkpage[starred="true"] wird zum Beispiel genutzt um das list-style-image zu ändern (gefüllter/umrandeter Stern)]. Dazu nutze ich das oben erwähnte - leicht nachvollziehbare - Beipiel.

  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mitleser
    • 4. Juni 2024 um 17:16

    milupo Danke! Genau so (MutationObserver) werde ich das am Wochemende machen.


    Mira_Belle Die Funktion kannst du in Zeile 14 ändern.
    const oncommand = 'gContextMenu.bookmarkThisPage();';

    Zitat von Mira_Belle

    Erkläre es mir bitte doch noch einmal mit dem Reloadbutton, oder besser mit einer Funktion,
    die so im Menü nicht vorkommt! Z.B. "Reload userChrome.css" oder "Downloadfenster öffnen" oder
    "Anwendungsmenü öffnen" (Hamburgermenü).

    Einen Menüeintrag einer Funktion hinzufügen kann man auch (siehe #23).
    Das ist hier aber nicht die 'Aufgabenstellung'.

  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mitleser
    • 4. Juni 2024 um 17:03

    Oder Du probierst das Script aus Beitrag #3.823 einfach mal aus!

  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mitleser
    • 4. Juni 2024 um 16:55

    Genau falsch! Es dreht sich um die ganz normale Funktion des Bookmarken einer Site. Und das Ganze ist eine Übung/ein Test für andere Menüeinträge.

    Zitat von Mitleser

    Ja, ich weiß ...Bookmarksterne sind auf der Browseroberfläche mehrfach vorhanden (z.B.: urlbar), dies ist einfach nur ein Test für ContextMenu-Einträge.

  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mitleser
    • 4. Juni 2024 um 16:09

    Es fügt dem Kontextmenü einen neuen Eintrag hinzu (Lesezeichen speichern/bearbeiten) und ist lediglich ein Test für Kontextmenüeinträge.
    EDIT: Ein Vorteil wäre vieleicht, dass der Eintrag in allen Kontextmenüs erscheint (auch bei rechte Maus über Bild/Link/usw.).

  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mitleser
    • 4. Juni 2024 um 15:27

    Danke für den Tipp! Ich werde mich in den nächsten Tagen mal damit beschäftigen.

  • SSL-Zertifikat ungültig? Wie trotzdem akzeptieren?

    • Mitleser
    • 4. Juni 2024 um 00:12

    Ja, kannste mal sehen:
    Firefox ist doch der sichere Browser! Der warnt vor dem Zugriff oder unterbindet den Zugriff...
    Nutz doch einfach einen unsicheren Browser....

  • userChrome.js Scripte für den Fuchs (Diskussion)

    • Mitleser
    • 3. Juni 2024 um 23:24

    Hallo,
    ich suche einen 'EventListener', der 'feuert' wenn sich ein Attribut einer ID ändert, zum Beispiel so ähnlich:
    document.getElementById('context-bookmarkpage').addEventListener('irgendwas mit attribute und changed/modified o.ä.', funktionsname);
    Konkret geht es um den Bookmarkstern im ContextMenu (oben in der menugroup). In der Konsole wird je nach 'Lesezeichen gespeichert/nicht gespeichert'
    document.getElementById('context-bookmarkpage').getAttribute('starred');
    dies ausgegeben: "true"/null
    Hier das funktionierende Test-Script mit einem Test-EventListener (der ununterbrochen feuert und NICHT verwendet werden sollte):
    Vielen Dank für die Mühe!

    Spoiler anzeigen
    JavaScript
    // JavaScript Document
    // M_BookmarkThisPage_126_Test08.uc.js
    (function () {
      if (location.href !== 'chrome://browser/content/browser.xhtml') 
        return;
    // ■■ START UserCustomisation ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
    const buttonIcon1 = 'bookmark-hollow.svg';  // Name.Dateiendung des anzuzeigenden Symbols | Name.file extension of the symbol to be displayed
    const buttonIcon2 = 'bookmark.svg';  // Name.Dateiendung des anzuzeigenden Symbols | Name.file extension of the symbol to be displayed
    const iconPath = '/chrome/icons/'; // Pfad zum Ordner der das Icon beinhaltet | Path to folder containing the icon
    const label1 = 'Als Lesezeichen speichern'; // [starred=null]
    const label2 = 'Lesezeichen bearbeiten'; // [starred="true"]
    const tooltiptext = 'Site als Lesezeichen speichern/bearbeiten';
    // ■■ END UserCustomisation ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
    const oncommand = 'gContextMenu.bookmarkThisPage();';
    const curProfDir = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir));
    const menuitem1 = document.createXULElement('menuitem');
          menuitem1.id = 'contextBookmarkpage';
          menuitem1.setAttribute('tooltiptext', tooltiptext);
          menuitem1.setAttribute('oncommand', oncommand);
          menuitem1.classList.add('menuitem-iconic');
    const refItem1 = document.getElementById('context-inspect');
       	  refItem1.parentNode.insertBefore(menuitem1, refItem1.nextSibling);
    // Status aktualisieren
    
    //document.getElementById('context-bookmarkpage').addEventListener('irgendwas mit attribute und changed/modified', funktionsname); ?
    
    gBrowser.tabContainer.addEventListener('TabAttrModified', exc);// NUR für Testzwecke zu gebrauchen ! 
    function exc() {
    		  setTimeout(() => {
    // Label aktualisieren
    		if (menuitem1.getAttribute('starred') == ''){
    			menuitem1.setAttribute('label', 'funzt');
    			}
       else if (menuitem1.getAttribute('starred') == "null"){
    			menuitem1.setAttribute('label', label1);
    			}
       else if (menuitem1.getAttribute('starred') == "true"){
    			menuitem1.setAttribute('label', label2);
    			}
          else {
    			menuitem1.setAttribute('label', 'funzt nicht');
    			}
    // starred-attribut vom Original 'context-bookmarkpage' clonen
    menuitem1.setAttribute('starred', "null");
    const orig = document.getElementById('context-bookmarkpage');
    let duplic = orig.getAttributeNode('starred');
    menuitem1.setAttributeNode(duplic.cloneNode(true));
      }, 700);
    //-----------------------------------------
    	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(`
    	#contextBookmarkpage[starred="true"] image {
    		list-style-image: url(${curProfDir}${iconPath}${buttonIcon2}) !important;
    		transform: scale(0.9) !important;
    		-moz-context-properties: fill;
    		fill: orange !important;
    	}
    	#contextBookmarkpage[starred="true"]:hover image {
    		list-style-image: url(${curProfDir}${iconPath}${buttonIcon2}) !important;
    		fill: lightgreen !important;
    	}
    	#contextBookmarkpage[starred=null] image/*, 
    	#contextBookmarkpage image*/{
    		list-style-image: url(${curProfDir}${iconPath}${buttonIcon1}) !important;
    		transform: scale(0.9) !important;
    		-moz-context-properties: fill;
    		fill: orange !important;
    	}
    	#contextBookmarkpage[starred=null]:hover image/*, 
    	#contextBookmarkpage:hover image*/{
    		list-style-image: url(${curProfDir}${iconPath}${buttonIcon1}) !important;
    		fill: lightgreen !important;
    	}
    	`), null, null);
    sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
    //-------------------------------------
          };
    })();
    Alles anzeigen

    icons.zip

    Ja, ich weiß ...Bookmarksterne sind auf der Browseroberfläche mehrfach vorhanden (z.B.: urlbar), dies ist einfach nur ein Test für ContextMenu-Einträge.

  • JavaScript & Pfadangaben

    • Mitleser
    • 17. Mai 2024 um 00:07
    Zitat von Mira_Belle

    Und
    menuitem.style.listStyleImage = 'url("' + ....... + '")';
    funktioniert auch.

    Werde ich mal übernehmen, ist ja irgendwie 'eleganter'...

  • JavaScript & Pfadangaben

    • Mitleser
    • 16. Mai 2024 um 22:58
    Zitat von Mira_Belle

    Ich fress 'en Besen.

    Burger tuts auch 🍔️ ...

  • JavaScript & Pfadangaben

    • Mitleser
    • 16. Mai 2024 um 22:17

    Dies funzt bei mir (nur ein Beispiel), vieleicht bringt Dich das weiter.:

    JavaScript
    // JavaScript Document
    // Test_gContextMenu.uc.js
    
    (function() {
    // ■■ START UserCustomisation ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
    
    const buttonIcon = 'DeepL_2.png';  // Name.Dateiendung des anzuzeigenden Symbols | Name.file extension of the symbol to be displayed
    const buttonPath = '/chrome/icons/'; // Pfad zum Ordner der das Icon beinhaltet | Path to folder containing the icon
    const label = 'Test_gContextMenu'
    const tooltiptext = 'Site als Lesezeichen speichern/ändern';
    const oncommand = "gContextMenu.bookmarkThisPage();";
    
    // ■■ END UserCustomisation ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
    const curProfDir = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir));
    
    
    // -- Contextmenu -----------------------------------------------
    const menuitem1 = document.createXULElement('menuitem');
          menuitem1.id = 'tabContextBookmarkpage';
          menuitem1.setAttribute('label', label);
          menuitem1.setAttribute('tooltiptext', tooltiptext);
          menuitem1.setAttribute('oncommand', oncommand);
          menuitem1.classList.add('menuitem-iconic');
          menuitem1.style = "list-style-image: url('" + curProfDir + buttonPath + buttonIcon + "');";
    
    const refItem1 = document.getElementById('context-inspect');
       	  refItem1.parentNode.insertBefore(menuitem1, refItem1.nextSibling);
     
    })();
    Alles anzeigen
  • FF126: AnimationToggleButton.uc.js tuts nich mehr

    • Mitleser
    • 15. Mai 2024 um 23:42

    Super, freut mich.
    Aber an Zeile 75 bin ich nicht schuld, siehe Originalbeitrag (oder klicke auf das Zitat).
    Danke auch an Sören Hentzschel für die Info.

  • FF126: AnimationToggleButton.uc.js tuts nich mehr

    • Mitleser
    • 15. Mai 2024 um 23:08

    Du nutzt das Script von hier?

    Zitat von Endor

    Bitte mal testen:

    Ich hab das nur überflogen aber:

    Zeile 62 fehlt am Ende ein Semikolon und in
    Zeile 78

    Zitat von Endor

    setPref('once');


    ist BrowserReload(); nicht durch BrowserCommands.reload(); ersetzt.

    Vieleicht wars das schon?

  • Was hört Ihr gerade?

    • Mitleser
    • 12. Mai 2024 um 20:58

    Alles nur geklaut!

    Externer Inhalt www.youtube.com
    Inhalte von externen Seiten werden ohne deine Zustimmung nicht automatisch geladen und angezeigt.
    Durch die Aktivierung der externen Inhalte erklärst du dich damit einverstanden, dass personenbezogene Daten an Drittplattformen übermittelt werden. Mehr Informationen dazu haben wir in unserer Datenschutzerklärung zur Verfügung gestellt.

  • Tooltips nur für die Bedienoberfläche ausschalten?

    • Mitleser
    • 12. Mai 2024 um 19:58

    Zeile 52 + 68 löschen?

  • Tooltips nur für die Bedienoberfläche ausschalten?

    • Mitleser
    • 12. Mai 2024 um 17:54

    Ich nutze für mich (LINUX, keine Garantie für andere BS) allerdings dies (mit den gleichen Icons wie oben):

    Spoiler anzeigen
    JavaScript
    // B_Tooltip_toggle.uc.js
    // dark theme
    
    /*1. Verhalten des Tooltips beim start (ausgeschaltet/opacity:0)->*/
    (function ttstart() {
    // start config area--------------------------------------------
    
      let IconPath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')); // Pfad zum Ordner der das .svg-Symbol (mit: fill="context-fill" fill-opacity="context-fill-opacity") beinhaltet.
    
    // end config area----------------------------------------------
    g1_tooltip_b = "0";
    	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(`
    tooltip[label*=" "],
    tooltip,
    #tabbrowser-tab-tooltip {
        appearance: none !important;
    	background-color: #3f3f3f !important;
    	color: #F9F9F9 !important;
    	font-size: 13px !important;
    	line-height: unset !important;
    	border: 1px solid #b03b0099 !important;
    	border-radius: 4px !important;
        box-shadow: none !important;
    	width: auto !important;
    	height: auto !important;
    	justify-content: center !important;
    	align-items: center !important;
    	align-content: center !important;
    	vertical-align: middle !important;
    	overflow: hidden !important;
    	padding: 3px 7px 5px 7px !important;
    	display: none !important;
    }
    .places-tooltip-title {
    	border-bottom: 1px solid #b03b0099 !important;
    	padding-bottom: 3px !important;
    	margin-left: -7px !important;
    	margin-right: -7px !important;
    	padding-left: 7px !important;
    	padding-right: 7px !important;
    	color: #F9F9F9 !important;	
    }
    .places-tooltip-uri {
    	font-size: 13px !important;
    	padding-top: 4px !important;
    	padding-bottom: 0px !important;
    	color: #b0b0b0 !important;
    }
    .places-tooltip {
        display: flex !important;
    }
    #remoteBrowserTooltip{
        display: none !important;
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■Tabvorschau■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    /*muss in user.js aktiviert werden*/
    .tab-preview-container {
    	border: 1px solid #b03b0099 !important;
    	border-radius: 4px !important;
        background-color: #3f3f3f !important;
        margin: 0 !important;
    	margin-top: 10px !important;
        padding: 0 !important;
    	line-height: unset !important;
        display: none !important;
    }
    .tab-preview-text-container {
        border-radius: 0 !important;
        border: 0 !important;
        background: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    .tab-preview-title,
    .tab-preview-uri {
    	font-size: 13px !important;
    	font-weight: normal !important;
        margin: 0 !important;
    }
    .tab-preview-title {
    	color: #F9F9F9 !important;
    	border-bottom: 0px solid #b03b0099 !important;
        padding: 3px 7px 3px 7px !important;
    	max-height: 200px !important;
    	word-break: break-word !important;
    }
    .tab-preview-uri {
        color: #b0b0b0 !important;	
    	border-top: 1px solid #b03b0099 !important;
        padding: 3px 7px 4px 7px !important;
    	max-height: 200px !important;
    }
    .tab-preview-thumbnail-container img,
    .tab-preview-thumbnail-container canvas {
    	border-top: 1px solid #b03b0099 !important;
    }
    .tab-preview-thumbnail-container {
    	border-top: 0px solid #b03b0099 !important;
    	&:empty {
        display: none !important;
    	}
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    #toggle-tt-button .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-empty_contprop.svg") !important;
    	fill: #f60 !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    	padding-top: 6.5px !important;
    	padding-bottom: 5.5px !important;
    }
    #toggle-tt-button:hover .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-empty_contprop.svg") !important;
    	fill: #dddddd !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    	padding-top: 6.5px !important;
    	padding-bottom: 5.5px !important;
    }
    #toggle-tt-button:active .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-text_contprop.svg") !important;
    	fill: gold !important;
    	transition: fill 0.0s ease-in-out 0.0s !important;
    	padding-top: 6.5px !important;
    	padding-bottom: 5.5px !important;
    } 
    	`), null, null);
    
    sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
    })();
    
    /*2. Einschalten des Tooltips per Button (opacity:1)->*/
    function tton() {
    // start config area--------------------------------------------
    
      let IconPath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')); // Pfad zum Ordner der das .svg-Symbol (mit: fill="context-fill" fill-opacity="context-fill-opacity") beinhaltet.
    
    // end config area----------------------------------------------
    g1_tooltip_b = "1";
    	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(`
    tooltip[label*=" "],
    tooltip,
    #tabbrowser-tab-tooltip {
    	display: flex !important;
    }
    .places-tooltip {
        display: flex !important;
    }
    #remoteBrowserTooltip{
        display: none !important;
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■Tabvorschau■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    .tab-preview-container {
        display: block !important;
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    #toggle-tt-button .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-text_contprop.svg") !important;
    	fill: gold !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    }
    #toggle-tt-button:hover .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-text_contprop.svg") !important;
    	fill: #dddddd !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    }
    #toggle-tt-button:active .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-empty_contprop.svg") !important;
    	fill: #f60 !important;
    	transition: fill 0.0s ease-in-out 0.0s !important;
    }
    	`), null, null);
    
    sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
    }
    
    /*2a. Einschalten aller Tooltips per Button (opacity:1)->*/
    function ttallon() {
    // start config area--------------------------------------------
    
      let IconPath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')); // Pfad zum Ordner der das .svg-Symbol (mit: fill="context-fill" fill-opacity="context-fill-opacity") beinhaltet.
    
    // end config area----------------------------------------------
    g1_tooltip_b = "2";
    	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(`
    tooltip[label*=" "],
    tooltip,
    #tabbrowser-tab-tooltip {
    	display: flex !important;
    }
    .places-tooltip {
        display: flex !important;
    }
    #remoteBrowserTooltip{
        display: flex !important;
    	padding: 4px 7px 4px 7px !important;
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■Tabvorschau■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    .tab-preview-container {
        display: block !important;
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    #toggle-tt-button .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-text_contprop.svg") !important;
    	fill: #72a572 !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    }
    #toggle-tt-button:hover .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-text_contprop.svg") !important;
    	fill: #dddddd !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    }
    #toggle-tt-button:active .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-empty_contprop.svg") !important;
    	fill: #cd0e14 !important;
    	transition: fill 0.0s ease-in-out 0.0s !important;
    }
    	`), null, null);
    
    sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
    }
    
    /*3. Ausschalten des Tooltips per Button (opacity:0)->*/
    function ttoff() {
    // start config area--------------------------------------------
    
      let IconPath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')); // Pfad zum Ordner der das .svg-Symbol (mit: fill="context-fill" fill-opacity="context-fill-opacity") beinhaltet.
    
    // end config area----------------------------------------------
    g1_tooltip_b = "0";
    	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(`
    tooltip[label*=" "],
    tooltip,
    #tabbrowser-tab-tooltip {
    	display: none !important;
    }
    .places-tooltip {
        display: flex !important;
    }
    #remoteBrowserTooltip{
        display: none !important;
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■Tabvorschau■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    .tab-preview-container {
        display: none !important;
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    #toggle-tt-button .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-empty_contprop.svg") !important;
    	fill: #f60 !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    }
    #toggle-tt-button:hover .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-empty_contprop.svg") !important;
    	fill: #dddddd !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    }
    #toggle-tt-button:active .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-text_contprop.svg") !important;
    	fill: gold !important;
    	transition: fill 0.0s ease-in-out 0.0s !important;
    }
    	`), null, null);
    
    sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
    }
    
    /*3a. Ausschalten aller Tooltips per Button (opacity:0)->*/
    function ttalloff() {
    // start config area--------------------------------------------
    
      let IconPath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons')); // Pfad zum Ordner der das .svg-Symbol (mit: fill="context-fill" fill-opacity="context-fill-opacity") beinhaltet.
    
    // end config area----------------------------------------------
    g1_tooltip_b = "3";
    	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(`
    tooltip[label*=" "],
    tooltip,
    #tabbrowser-tab-tooltip {
    	display: none !important;
    }
    .places-tooltip {
        display: none !important;
    }
    #remoteBrowserTooltip{
        display: none !important;
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■Tabvorschau■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    .tab-preview-container {
        display: none !important;
    }
    /*■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■*/
    #toggle-tt-button .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-empty_contprop.svg") !important;
    	fill: #cd0e14 !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    }
    #toggle-tt-button:hover .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-empty_contprop.svg") !important;
    	fill: #dddddd !important;
    	transition: fill 0.4s ease-in-out 0.0s !important;
    }
    #toggle-tt-button:active .toolbarbutton-icon {
    	list-style-image: url("${IconPath}/16_tooltip-text_contprop.svg") !important;
    	fill: #72a572 !important;
    	transition: fill 0.0s ease-in-out 0.0s !important;
    }
    	`), null, null);
    
    sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
    }
    
    /*4. Button Tooltip on/off (opacity: 1/0)->*/
    (function() {
    /*Icon + Iconpfad wird durch 1.-3. geregelt (sollte der Pfad oder die Icons dort entfernt werden, muss das hier wieder aktiviert werden); Nachteil: nur ein Icon, keine transition; kein fill*/
    /*
    // start config area
    
    let ButtonIcon = "16_tooltip-text_contprop.svg" // Name & Dateiendung des anzuzeigenden Symbols.
    let ButtonIconPath = "/chrome/css/image/" // Pfad zum Ordner der das Symbol beinhaltet.
    
    // end config area
    */
    
    	if (location.href !== 'chrome://browser/content/browser.xhtml') return;
           try {
              CustomizableUI.createWidget({
                 id: 'toggle-tt-button',
                 type: 'custom',
                 defaultArea: CustomizableUI.AREA_NAVBAR,
                 onBuild: function(aDocument) {         
                    let toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
                    var props = {
                       id: 'toggle-tt-button',
                       class: 'toolbarbutton-1 chromeclass-toolbar-additional',
                       removable: 'true',
                       label: 'Toggle Tooltip',
                       accesskey: '',
                       tooltiptext: 'Tooltip on/off\n\nStart: Nur Tt-Bookmarks sichtbar\n\nToggle Linksklick\nLinksklick \'on\': Alle bis auf Tt-Content sichtbar\nLinksklick \'off\': zurück auf \'Start\'\n\nToggle Mittelklick\nMittelklick \'on\': ALLE Tt\'s sichtbar \nMittelklick \'off\': ALLE Tt\'s ausgeblendet'
    /*				   style: "list-style-image: url('" + PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir)) + ButtonIconPath + ButtonIcon + "');",*/
    /*Icon+Pfad wird durch 1.-3. geregelt (sollte der Pfad oder die Icons dort entfernt werden, muss das hier wieder aktiviert werden)*/
                   };                  
               for(var p in props)
               toolbaritem.setAttribute(p, props[p]);
               return toolbaritem;                
               }
            });
        } catch(e) { };
    
    document.getElementById('toggle-tt-button').addEventListener( "click", onClick );
    
    	function onClick(aEvent) {
    
    if (event.button == 0) {
           	 if(g1_tooltip_b == '')  {
               	g1_tooltip_b = '1';
    			tton();
                }
        else if(g1_tooltip_b == '0') {
               	g1_tooltip_b = '1';
    			tton();
                }
        else if(g1_tooltip_b == '1') {
               	g1_tooltip_b = '0';
    			ttoff();
    		    }/**/
        else if(g1_tooltip_b == '3') {
               	g1_tooltip_b = '0';
    			ttoff();
                }
        else if(g1_tooltip_b == '2') {
               	g1_tooltip_b = '1';
    			ttoon();
    		    }
    }
    else
    if (event.button == 1) {
    		 if(g1_tooltip_b == '')  {
               	g1_tooltip_b = '2';
    			tton();
                }       	 
    	else if(g1_tooltip_b == '2')  {
               	g1_tooltip_b = '3';
    			ttalloff();
                }
        else if(g1_tooltip_b == '3') {
               	g1_tooltip_b = '2';
    			ttallon();
                }/**/
        else if(g1_tooltip_b == '1') {
               	g1_tooltip_b = '2';
    			ttallon();
                }
        else if(g1_tooltip_b == '0') {
               	g1_tooltip_b = '3';
    			ttalloff();
                }
    }
    else
    if (event.button == 2) {
    event.button.stopPropagation();
    //alert("Rechtsklick wird nicht unterstützt");
    }
    else {
    alert("ERROR: B_Tooltip_toggle.uc.js");
    	};
      }
    })();
    Alles anzeigen

    Ja ich weiß, ist wie mit Kanonen auf Spatzen schießen, deshalb am Besten gleich wieder vergessen!

  • Tooltips nur für die Bedienoberfläche ausschalten?

    • Mitleser
    • 12. Mai 2024 um 15:09

    Oder so mit 2 Icons:

    icons.zip

    JavaScript
    (function() {
    // start customisation area----------------------------------
    
    const buttonIcon1 = '16_tooltip-empty_contprop.svg'; // Name & Dateiendung des anzuzeigenden Symbols
    const buttonIcon2 = '16_tooltip-text_contprop.svg'; // Name & Dateiendung des anzuzeigenden Symbols
    const buttonPath = '/chrome/icons/'; // Pfad zum Ordner der die Icons beinhaltet
    
    // end customisation area-----------------------------------
    const curProfDir = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir));
    
      if(location.href != 'chrome://browser/content/browser.xhtml') return;
       try {
          CustomizableUI.createWidget({
             id: 'Tooltip-button',
             type: 'custom',
             defaultArea: CustomizableUI.AREA_NAVBAR,
             onBuild: function(aDocument) {
                var button = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
                var attributes = {
                   id: 'Tooltip-button',
                   class: 'toolbarbutton-1 chromeclass-toolbar-additional',
                   removable: 'true',
                   label: 'Tooltip aktivieren/deaktivieren',
                   tooltiptext: Services.prefs.getBoolPref('browser.chrome.toolbar_tips') ?
                      'Tooltip frei' : 'Tooltip gesperrt',
                   oncommand: '(' + onCommand.toString() + ')()'
                };
                for (var a in attributes) {
                   button.setAttribute(a, attributes[a]);
                };
                function onCommand() {
                   var isEnabled = !Services.prefs.getBoolPref('browser.chrome.toolbar_tips');
                   Services.prefs.setBoolPref('browser.chrome.toolbar_tips', isEnabled);
                   var windows = Services.wm.getEnumerator('navigator:browser');
                   while (windows.hasMoreElements()) {
                      let button = windows.getNext().document.getElementById('Tooltip-button');
                      if (isEnabled)
                         button.setAttribute('tooltiptext', 'Tooltip frei')
                      else
                         button.setAttribute('tooltiptext', 'Tooltip gesperrt');
                   };
                };
                return button;
             }
          });
       } catch(e) { };
    
    //-----------------------------------------
    	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(`
    
    #Tooltip-button[tooltiptext="Tooltip gesperrt"] {
        list-style-image: url(${curProfDir}${buttonPath}${buttonIcon1});
    	fill: red !important;
    }
    #Tooltip-button[tooltiptext="Tooltip frei"] {
        list-style-image: url(${curProfDir}${buttonPath}${buttonIcon2});
    	fill: green !important;
    }
    	`), null, null);
    sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
    //-----------------------------------------------------------------
    })();
    Alles anzeigen
  • Lesezeichen Firefox

    • Mitleser
    • 9. Mai 2024 um 00:06

    Solltest Du den Ordner wiederherstellen wollen, könntest Du in der Bibliothek fündig werden. Unter dem Menüpunkt Verwalten > Rückgängig...

    Aber das war ja nicht Deine Frage. Mich stört auch, dass der User ohne Bestätigungsdialog einen LZ-Ordner löschen kann (und dass ohne Mahnung von FF, vorsichtig zu sein). Kann aber wieder rückgänig gemacht/wiederhergestellt werden.

    Und irgendwie sollte jeder selbst für sein Handeln die Verantwortung übernehmen.

Unterstütze uns!

Jährlich (2026)

59,3 %

59,3% (459,86 von 775 EUR)

Jetzt spenden
  1. Kontakt
  2. Datenschutz
  3. Impressum
Community-Software: WoltLab Suite™
Mastodon