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. Dharkness

Beiträge von Dharkness

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 16. Juli 2023 um 18:01
    Zitat von Horstmann

    Code dazu, zack-zack! ;)

    Aber bitte doch.

    JavaScript
    // BookmarkCount.uc.js
    
    /* ******************************************************************************************************************* */
    /* Author BrokenHeart               => https://www.camp-firefox.de/forum/thema/136572/?postID=1229536#post1229536 **** */
    /* Correction from BrokenHeart      => https://www.camp-firefox.de/forum/thema/136572/?postID=1229696#post1229696 **** */
    /* Extension from Sören Henschel    => https://www.camp-firefox.de/forum/thema/136572/?postID=1229555#post1229555 **** */
    /* Customized by Mira inspired by grisu2099     ********************************************************************** */
    /* Source                           => https://www.camp-firefox.de/forum/thema/136572/?postID=1229875#post1229883 **** */
    /* Customized by Mira inspired by Horstmann     ********************************************************************** */
    /* Source                           => https://www.camp-firefox.de/forum/thema/136572/?postID=1229993#post1229993 **** */
    /* ******************************************************************************************************************* */
    /* Version 1.01                     => https://www.camp-firefox.de/forum/thema/136572/?postID=1230128#post1230128 **** */
    /* Version 1.02                     => https://www.camp-firefox.de/forum/thema/136572/?postID=1230334#post1230334 **** */
    /* ******************************************************************************************************************* */
    /* Custom Counter in the Bookmarks for folders and links ************************************************************* */
    /* ******************************************************************************************************************* */
    /* rechtsbündig ****************************************************************************************************** */
    
    (function() {
    
        if (!window.gBrowser) return;
    
        setTimeout(function() {
            setFunction();
        },50);
    
        let profilePath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons'))
        let icon1 = "folder-4s.png"
        let icon2 = "Bildschirm-3.png"
    
        function setFunction() {
    
            const css =`
                .countClass1::before {
                    content: "";
                    background-image: url(${profilePath}/${icon1});     /*  Custom icon  */
                    background-repeat: no-repeat;
                    background-size: 16px;                              /* icon size */
                    background-position: center;
                    margin-left: 16px !important;                       /* Abstand links minimum für schmale Popus  CHANGE  */
                    margin-right: 2px !important;                      /* Abstand Icon "Ordner" bis zum "Zähler" */
                    height: 16px;
                    width: 16px;
                    fill: #c0c0c0;
                    fill-opacity: 1;
                }
    
                /* Default FX left margin ist 16px !! -->  CHANGE  */
    
                .countClass1 label {
                    margin-inline: 0px !important;
                }
                /* Ordner container Inhalt zentriert -->  CHANGE  */
    
                hbox.menu-accel-container.countClass1 {
                    align-items: center !important;
                }
    
                .countClass1::after {
                    content: attr(data-value1) !important;
                    font-family:  Consolas, "Lucida Console", "Courier New", monospace !important;
                    font-size: 12px !important;
                    font-weight: 900 !important;
                    color: #D2534C !important;                        /* Farbe des 1. Textes */
                    height: 14px;                                       /* height = font size Text zentriert CHANGE  */
                    width: 15px !important;                             /* Platzhalter für Anzahl der Stellen */
                    padding-left: 4px !important;                       /* height = font size Text zentriert CHANGE  */
                    margin-right: 0px !important;                       /* Abstand zum Icon "Links" rechts */
    
                    /* background-color: lightblue; */                /*  TEST  */
                }
                .countClass2::before {
                    content: "|";
                    color: #D2534C !important;                        /* Farbe des 1. Textes */
                    background-image: url(${profilePath}/${icon2});     /*  Custom icon  */
                    background-repeat: no-repeat;
                    background-size: 16px;                              /* icon size */
                    background-position: center;
                    padding-right: 16px;
                    padding-bottom: 4px;
                    margin-left: 6px !important;                        /* Abstand "Zähler 1" zum Icon2 */
                    margin-right: -12px !important;                      /* Abstand Icon "Links" bis zum "Zähler" */
                    height: 16px;
                    width: 16px;
                    fill: #c0c0c0;
                    fill-opacity: 1;
                }
                .countClass2::after {
                    content: attr(data-value2);
                    font-family:  Consolas, "Lucida Console", "Courier New", monospace !important;
                    font-size: 12px !important;
                    font-weight: 900 !important;
                    color: #D2534C !important;                        /* Farbe des 2. Textes */
                    height: 14px;                                       /* height = font size Text zentriert CHANGE  */
                    width: 15px !important;                             /* Platzhalter für Anzahl der Stellen (25px für 3 Stellen) */
                    padding-left: 4px !important;                       /* height = font size Text zentriert CHANGE  */
                    margin-right: 8px !important;                       /* Abstand zum Pfeil recht */
    
                    /* background-color: lightblue; */                /*  TEST  */
                }
                .countClass2 image {
                    order: 1;                                           /* Pfeil ganz nach rechts */
                }
            `;
    
            const sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
            const uri = Services.io.newURI('data:text/css,' + encodeURIComponent(css));
            sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
    
            let bmbMenu = document.getElementById('bookmarks-menu-button');
            let bookMenu = document.getElementById('bookmarksMenu');
            let persToolBar = document.getElementById('PersonalToolbar');
    
            if(bmbMenu)
                bmbMenu.addEventListener('popupshowing', onPopupShowing );
            if(bookMenu)
                bookMenu.addEventListener('popupshowing', onPopupShowing );
            if(persToolBar)
                persToolBar.addEventListener('popupshowing', onPopupShowing );
        }
    
        function onPopupShowing(aEvent) {
    
            let popup = aEvent.originalTarget;
    
            for (let item of popup.children) {
                if (item.localName != 'menu' || item.id?.startsWith('history')) {
                    continue;
                }
                setTimeout(() => {
                  let itemPopup = item.menupopup;
                  itemPopup.hidden = true;
                  itemPopup.collapsed = true;
                  itemPopup.openPopup();
                  itemPopup.hidePopup();
                  let menuitemCount = 0;
                  let menuCount = 0;
                  for (let subitem of itemPopup.children) {
                    if (subitem.classList.contains('bookmark-item') && !subitem.disabled && !subitem.hidden) {
                      if (subitem.localName == 'menuitem') {
                        menuitemCount++;
                      } else if (subitem.localName == 'menu') {
                        menuCount++;
                      }
                    }
                  }
                  itemPopup.hidden = false;
                  itemPopup.collapsed = false;
                  item.style.color = '#c0c0c0';
    
                  let label1 = item.childNodes[3];
    
                  label1.classList.add('countClass1');
                  let strCountOut1 = String(menuCount).padStart(2, '\xa0');
    
                  label1.setAttribute('data-value1', strCountOut1);
    
                  let label2 = item.childNodes[4];
    
                  label2.classList.add('countClass2');
                  let strCountOut2 = String(menuitemCount).padStart(3, '\xa0');
    
                  label2.setAttribute('data-value2', strCountOut2);
    
                }, 100);
            }
        }
    })();
    Alles anzeigen
  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 16. Juli 2023 um 12:43
    Zitat von Mira_Belle

    Gerne doch.

    So, das ↓ habe ich jetzt daraus gebaut, also noch einmal Dankeschön. :)

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 16. Juli 2023 um 00:11
    Zitat von Mira_Belle

    So.

    So ist es in der Tat fein, Dankeschön. :)

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 15. Juli 2023 um 23:26
    Zitat von Horstmann

    Aber wieso, die Zahlen rechtsbündig geht doch genauso gut mit den Zahlen nach den Icons?

    Und wie, wenn man das ↓ als Basis nimmt?

    JavaScript
    // BookmarkCount.uc.js
    
    /* ******************************************************************************************************************* */
    /* Author BrokenHeart               => https://www.camp-firefox.de/forum/thema/136572/?postID=1229536#post1229536 **** */
    /* Correction from BrokenHeart      => https://www.camp-firefox.de/forum/thema/136572/?postID=1229696#post1229696 **** */
    /* Extension from Sören Henschel    => https://www.camp-firefox.de/forum/thema/136572/?postID=1229555#post1229555 **** */
    /* Customized by Mira inspired by grisu2099     ********************************************************************** */
    /* Source                           => https://www.camp-firefox.de/forum/thema/136572/?postID=1229875#post1229883 **** */
    /* Customized by Mira inspired by Horstmann     ********************************************************************** */
    /* Source                           => https://www.camp-firefox.de/forum/thema/136572/?postID=1229993#post1229993 **** */
    /* ******************************************************************************************************************* */
    /* Version 1.01                     => https://www.camp-firefox.de/forum/thema/136572/?postID=1230128#post1230128 **** */
    /* Version 1.02                     => https://www.camp-firefox.de/forum/thema/136572/?postID=1230334#post1230334 **** */
    /* ******************************************************************************************************************* */
    /* Custom Counter in the Bookmarks for folders and links ************************************************************* */
    /* ******************************************************************************************************************* */
    
    (function() {
    
        if (!window.gBrowser) return;
    
        setTimeout(function() {
            setFunction();
        },50);
    
        let profilePath = PathUtils.toFileURI(PathUtils.join(PathUtils.profileDir, 'chrome', 'icons'))
        let icon1 = "folder-4s.png"
        let icon2 = "Bildschirm-3.png"
    
        function setFunction() {
    
            const css =`
                .countClass1::before {
                    content: "";
                    background-image: url(${profilePath}/${icon1});
                    background-repeat: no-repeat;
                    background-size: 16px;                  /* icon size */
                    background-position: center;
                    margin-left: 16px !important;           /* Abstand links minimum für schmale Popus  CHANGE  */
                    margin-right: -1px !important;          /* Abstand bis zum "Wert" der Ordner */
                    height: 16px;
                    width: 16px;
                }
    
                /* Default FX left margin ist 16px !! -->  CHANGE  */
    
                .countClass1 label {
                    margin-inline: 0px !important;
                }
                /* Ordner container Inhalt zentriert -->  CHANGE  */
    
                hbox.menu-accel-container.countClass1 {
                    align-items: center !important;
    
                }
                .countClass1::after {
                    content: attr(data-value1) !important;
                    font-family:  Consolas, "Lucida Console", "Courier New", monospace !important;
                    font-size: 12px !important;
                    font-weight: 900 !important;
                    color: #D2534C !important;
                    height: 14px;                           /* height = font size Text zentriert CHANGE  */
                    width: 15px !important;                 /* Platzhalter für Anzahl der Stellen */
                    padding-left: 4px !important;           /* height = font size Text zentriert CHANGE  */
                    margin-right: -4px !important;          /* Abstand zum Symbol rechts */
    
                /*    background-color: lightblue; */           /* TEST */
                }
                .countClass2::before {
                    content: "";
                    background-image: url(${profilePath}/${icon2});
                    background-repeat: no-repeat;
                    background-size: 16px;                  /* icon size */
                    background-position: center;
                    margin-left: 4px !important;            /* Abstand bis zum Icon der Links */
                    margin-right: -1px !important;           /* Abstand bis zum "Wert" der Links */
                    height: 16px;
                    width: 16px;
                    fill: #c0c0c0;
                    fill-opacity: 1;
                }
                .countClass2::after {
                    content: attr(data-value2);
                    font-family:  Consolas, "Lucida Console", "Courier New", monospace !important;
                    font-size: 12px !important;
                    font-weight: 900 !important;
                    color: #D2534C !important;
                    height: 14px;                           /* height = font size Text zentriert CHANGE  */
                    width: 15px !important;                 /* Platzhalter für Anzahl der Stellen (25px für 3 Stellen) */
                    padding-left: 4px !important;           /* height = font size Text zentriert CHANGE  */
                    margin-right: -1px !important;          /* Abstand zum Pfeil recht */
                    /* background-color: lightblue; */          /* TEST */
                }
                .countClass2 image {
                    order: 1;                               /* Pfeil hinter dem "Wert" der Links */
                }
            `;
    
            const sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
            const uri = Services.io.newURI('data:text/css,' + encodeURIComponent(css));
            sss.loadAndRegisterSheet(uri, sss.AGENT_SHEET);
    
            let bmbMenu = document.getElementById('bookmarks-menu-button');
            let bookMenu = document.getElementById('bookmarksMenu');
            let persToolBar = document.getElementById('PersonalToolbar');
    
            if(bmbMenu)
                bmbMenu.addEventListener('popupshowing', onPopupShowing );
            if(bookMenu)
                bookMenu.addEventListener('popupshowing', onPopupShowing );
            if(persToolBar)
                persToolBar.addEventListener('popupshowing', onPopupShowing );
        }
    
        function onPopupShowing(aEvent) {
    
            let popup = aEvent.originalTarget;
    
            for (let item of popup.children) {
                if (item.localName != 'menu' || item.id?.startsWith('history')) {
                    continue;
                }
                setTimeout(() => {
                  let itemPopup = item.menupopup;
                  itemPopup.hidden = true;
                  itemPopup.collapsed = true;
                  itemPopup.openPopup();
                  itemPopup.hidePopup();
                  let menuitemCount = 0;
                  let menuCount = 0;
                  for (let subitem of itemPopup.children) {
                    if (subitem.classList.contains('bookmark-item') && !subitem.disabled && !subitem.hidden) {
                      if (subitem.localName == 'menuitem') {
                        menuitemCount++;
                      } else if (subitem.localName == 'menu') {
                        menuCount++;
                      }
                    }
                  }
                  itemPopup.hidden = false;
                  itemPopup.collapsed = false;
                  item.style.color = '#c0c0c0';
    
                  let label1 = item.childNodes[3];
    
                  label1.classList.add('countClass1');
    //              let strCountOut1 = String(menuCount).padEnd(2) + '\xa0';     // padEnd2 => zwei Stellen, plus Abstand
                  let strCountOut1 = + menuCount + '\xa0'
                  label1.setAttribute('data-value1', strCountOut1);
    
                  let label2 = item.childNodes[4];
    
                  label2.classList.add('countClass2');
    //              let strCountOut2 = String(menuitemCount).padEnd(3, '\xa0');  // padEnd3 => drei Stellen, Abstand bei nur einer Ziffer
                  let strCountOut2 = + menuitemCount + '\xa0'
                  label2.setAttribute('data-value2', strCountOut2);
    
                }, 100);
            }
        }
    })();
    Alles anzeigen
  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 15. Juli 2023 um 16:58
    Zitat von grisu2099

    Wenn du damit leben kannst, daß die Icons vor den Icons sind, kannst du ja mal diese Version testen:

    Wenn Du mir erzählst, wie man den Schrägstrich zwischen Ordner und Bookmarks entfernt, könnte ich möglicherweise damit zurechtkommen.

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 15. Juli 2023 um 15:36
    Zitat von Mira_Belle

    Man bist Du ungeduldig.

    Aber ja doch. :saint:

    Jetzt noch den Text rechtsbündig ausrichten und das ganze wäre perfekt, siehst Du da eine Möglichkeit?

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 15. Juli 2023 um 14:57
    Zitat von Mira_Belle

    nach einigen Anregungen und weiterem Code eine weitere neue Version des Skriptes.

    Wo ist sie denn?

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 10. Juli 2023 um 16:42
    Zitat von Mira_Belle

    in etwa so =>

    Bei sieht es jetzt so ↓ aus.

    JavaScript
    // JavaScript Document
    // how_many_bookmarks aka BookmarkCount.uc.js
    // Author BrokenHeart
    // Source file https://www.camp-firefox.de/forum/thema/136572/?postID=1229536#post1229536
  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 10. Juli 2023 um 15:26
    Zitat von Boersenfeger

    Jetzt habe ich dann auch den Namen BookmarkCount.uc.js adaptiert.

    Bei mir heißt es how_many_bookmarks.uc.js.

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

    • Dharkness
    • 10. Juli 2023 um 15:22
    Zitat von 2002Andreas

    Das Skript bzw. der Code funktioniert auch nicht auf allen Icons.

    Hm, hier schon, nur manchmal erst beim 2ten mal.

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 9. Juli 2023 um 22:51
    Zitat von BrokenHeart

    Ich glaube eine Lösung für das Scrollproblem

    Na das ist doch mal fein, so kann ich das Script nun auch verwenden. :thumbup: :)

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 9. Juli 2023 um 18:57
    Zitat von Horstmann

    Das Script verursacht ein kurzes "Zucken" beim ersten Öffnen eines Lesezeichenordners mit den Zahleneinträgen, sonst scheint alles normal zu funktionieren.

    Erzeuge mal am unteren Ende des Ordners einen Ordner und lege in dem ein Lesezeichen ab.

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 9. Juli 2023 um 18:09
    Zitat von BrokenHeart

    Da muss ich jetzt auch leider sagen, dass das wirklich ein 'Showstopper' ist :( .

    Das ist für mich derzeit das Problem, ich habe zwar nicht sehr viele überlange Menüs, aber selbst bei diesen sehr wenigen nervt es doch, deshalb ist es hier z.Z. nicht aktiv.

  • Schrift in der Sidebar anpassen

    • Dharkness
    • 8. Juli 2023 um 14:56
    Zitat von 2002Andreas

    Nur jetzt funktioniert es hier auch wieder mit dem alten Code :/

    Dann bin ich wenigstens nicht alleine verwirrt. :saint:

  • Schrift in der Sidebar anpassen

    • Dharkness
    • 8. Juli 2023 um 14:46
    Zitat von 2002Andreas

    Teste bitte mal:

    Hm, warum funktioniert es bei mir noch immer mit treechildren::-moz-tree-cell-text? Ich finde diese Ungereimtheiten immer sehr merkwürdig, woran könnte das liegen?

  • Separates Downloads-Fenster?

    • Dharkness
    • 7. Juli 2023 um 20:56
    Zitat von 2002Andreas

    Und wenn es dann nicht so funktioniert wie du es möchtest, dann den neuen Eintrag in der config per Hand wieder entfernen.

    Hm, vorher muss das aber in der user.js auskommentiert werden, sonst wird es beim nächsten Start wieder gesetzt.

  • Nur die Anzeige der Ordner/Lesezeichenanzahl in einer anderen Farbe darstellen

    • Dharkness
    • 7. Juli 2023 um 16:07
    Zitat von BrokenHeart

    Mit diesem Script sollte es jetzt auch im Lesezeichen-Menu funktionieren:

    Im Lesezeichen-Menü bzw. in der Lesezeichensymbolleiste werden über lange Untermenüs leider automatisch ans Ende des Untermenüs gescrollt.

  • Separates Downloads-Fenster?

    • Dharkness
    • 7. Juli 2023 um 15:44
    Zitat von Mira_Belle

    Wo genau kann ich das Verhalten des Downloadfensters einstellen?

    In about:config? Allerdings wirst Du die Prefs wohl erst anlegen müssen.

  • Separates Downloads-Fenster?

    • Dharkness
    • 5. Juli 2023 um 21:24
    Zitat von FuchsFan

    Ich habe da noch einen anderen Gedanken, dass es eventuell durch das BS verursacht wird, weil ja ein neues Fenster geöffnet wird. Wenn ohne den CSS-Code mit dem Script gearbeitet wird, dann ist dort bei Hover auch dieser hellgraue Hintergrund da.

    Eher nicht, denn dann müsste ich das Problem auch haben, habe ich aber nicht.

  • Separates Downloads-Fenster?

    • Dharkness
    • 5. Juli 2023 um 19:48
    Zitat von FuchsFan

    Als Notlösung habe ich eine dunkle Farbe bei Hover gewählt.

    Hm,

    könnte das * eventuell helfen?

    *

    CSS
    #downloadsListBox richlistitem.download-state button.downloadButton:hover{
        border: 1px solid brown !important;
        --in-content-button-background-hover: none !important;
        background-color: greenyellow !important;
    }

Unterstütze uns!

Jährlich (2026)

35,3 %

35,3% (273,24 von 775 EUR)

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