1. Home
  2. News
  3. Download
    1. Thunderbird Release Version
    2. Thunderbird 140 ESR
    3. Thunderbird 115 ESR
    4. Thunderbird Beta Version
    5. Language Pack (User Interface)
    6. Dictionaries (Spell Check)
  4. Help & Lexicon
    1. Instructions for Thunderbird
    2. Questions & Answers (FAQ) about Thunderbird
    3. Help for this Website
    4. Last Changes
  5. Forums
    1. Unresolved Threads
    2. Latest Posts
    3. Threads of the last 24 hours
  • Login
  • Register
  • 
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Forum
  • Lexicon
  • Articles
  • Pages
  • More Options
  1. Thunderbird Mail DE
  2. Forum
  3. Hilfe zu Add-ons und manuellen Anpassungen
  4. Manuelle Anpassungen per CSS oder Script

Uhr in Tunderbird

    • 60.*
    • Windows
  • hwww
  • October 8, 2019 at 2:02 PM
  • Closed
  • Thread is Resolved
  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 8, 2019 at 2:02 PM
    • #1

    Um Rückfragen vorzubeugen, bitten wir um folgende Angaben:

    • Thunderbird-Version:60.9.0 32bit Portable
    • Betriebssystem + Version:Win 10 64bit

    Hallo

    Ich habe mit diesem Code eine Uhr Anzeige in Firefox oben in der Statusleiste.

    CSS
    (function() {
        function doDatClock() {
            var timestr = new Date().toLocaleDateString( locale , options );
            
            const blanks = '     ';
            let i = timestr.lastIndexOf(',');
            timestr = timestr.substring(0,i) + blanks + timestr.substring(i+1);
            
            if( count == 1 ) {
                var counter = new Date( 1000 * sec ).toISOString().substr( 11 , 8 ); // .replace(/^[0:]+/, '') // if you want to replace zeroes and colons
                timestr = timestr + '       (' + counter + ')';
                sec++;
            }
            ClockLabel.setAttribute( 'value', timestr );
        }
    
        var count = 1; // if you don't want a counter set this to zero
        var agent = 1; // if you just want the clock set this to zero
        var language = 'de-DE'; // locale, e.g. 'de-DE' , 'en-US' , 'fr-FR'
        var personalText = ''; // your personal text here
        var cssColor = 'black'; // Font Color
    
        var css = 'margin-left: 30px; padding-top: 4px !important; padding-left: 0px; color: ' + cssColor + '; font-weight: 600; text-shadow: none; width: 275px;';
        var cssA = 'margin-left: 70px; width: auto;';
    
        var options = {
            weekday: 'long',
            year: 'numeric',
            month: 'long',
            day: 'numeric',
                       hour: '2-digit',
            minute: '2-digit',
            second: '2-digit'
        };
    
        var sec = 0;
    
        var locale = language || window.navigator.languages[0];
    
        var position = document.getElementById('helpMenu');
    
        var ClockLabel = document.createXULElement('label');
        ClockLabel.setAttribute('id', 'statusbar-clock-display');
        ClockLabel.setAttribute('class', 'statusbarpanel-text');
        ClockLabel.setAttribute('style', css);
        position.parentNode.insertBefore(ClockLabel, position.nextSibling);
    
        if( agent == 1 ) {
            var AgentLabel = document.createXULElement('label');
            AgentLabel.setAttribute('id', 'statusbar-agent-display');
            AgentLabel.setAttribute('class', 'statusbarpanel-text');
            AgentLabel.setAttribute('style', css + cssA);
            var FFstr = window.navigator.userAgent.split(' ');
            var FF = FFstr[FFstr.length-1].replace( '/' , ' ' );
            var text  = " Firefox - G  Profile  " + AppConstants.MOZ_APP_VERSION_DISPLAY;
            AgentLabel.setAttribute( 'value', text );
            position.parentNode.insertBefore(AgentLabel, position.nextSibling);
        }
    
        if( count == 1 ) {
            ClockLabel.addEventListener('dblclick', function() { sec = 0; });
        }
    
        window.setInterval( doDatClock , 1000 );
    })();
    Display More

    Das sieht dann so aus.


    Frage wäre. Gibt es sowas auch für Thunderbird?

    Danke schon mal im voraus hwww

    Thunderbird 138.0.1 64bit

  • edvoldi
    Moderator
    Reactions Received
    281
    Posts
    7,582
    Member since
    23. Dec. 2005
    Helpful answers
    32
    • October 8, 2019 at 2:09 PM
    • #2

    Hallo hwww,

    Quote from hwww

    Frage wäre. Gibt es sowas auch für Thunderbird?

    ja, ich benutze dafür diesen Code:

    Code
    function doDatUhrCallback() {try{doDatUhr();}catch(ex){} }
    function doDatUhr() {
        var days = ["So", "Mo", "Di", "Mi", "Do", "Fr", "Sa"];
        var months = ["Jan", "Feb", "März", "Apr", "Mai", "Juni", "Juli", "Aug", "Sep", "Okt", "Nov", "Dez"];
    
        window.setTimeout(doDatUhrCallback, 1000);
    
        var D = new Date();
        var day = days[D.getDay()];
        var month = months[D.getMonth()];
        var year = D.getFullYear();
        var hour = D.getHours();
        var minute = D.getMinutes();
        var second = D.getSeconds();
    
        var date = " " + day + ", " + (D.getDate() < 10 ? "0" +D.getDate() : D.getDate()) + ". " + month + " " + year + "  \u2013  ";
        var time = (hour < 10 ? "0" +hour : hour) + ":" + (minute < 10 ? "0" +minute : minute) + ":" + (second < 10 ? "0" +second : second);
        var timestr = date + time + "" + "    ";
        var FFstr = AppConstants.MOZ_MACBUNDLE_NAME.split('.');
        var mbName = FFstr[0];
        var text = mbName + ' ' + AppConstants.MOZ_APP_VERSION_DISPLAY + '       ' + "> gestaltet von EDV Oldie <       "; 
    
        var status = document.getElementById("statusbar-clock-display");
        status.setAttribute("value",text + timestr);}
    
        //var ClockStatus = document.getElementById("statusbar-display");
        var ClockStatus = document.getElementById("helpMenu");
        var ClockLabel = document.createElement("label");
        ClockLabel.setAttribute("id", "statusbar-clock-display");
        ClockLabel.setAttribute("class", "statusbarpanel-text");
        ClockLabel.setAttribute("style", "padding-top:0px; padding-left:10px;color:blue");
        ClockStatus.parentNode.insertBefore(ClockLabel, ClockStatus.nextSibling);
        doDatUhr();
    Display More

    Name und Farbe musst Du natürlich anpassen.

    Auch alle Anpassungen die man für Scripts im Firefox machen muss, musst Du hier auch machen.


    Gruß
    EDV-Oldi

    WIN11 Home Version 25H2 (Build 26200.8524)

    Thunderbird 140.11.1esr (64-Bit)
    Thunderbird - Beta 152.0b3 (64-Bit)
    Thunderbird - Daily 153.0a1 (64-Bit)

    Firefox 151.0.3 (64-Bit)

    Thunderbird-Kalender: FAQ / Erweiterungen für den Kalender / Meine Erweiterungen

    Keine Forenhilfe per Konversation!

  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 8, 2019 at 2:21 PM
    • #3

    Hallo edvoldi

    Funktioniert bei mir leider nicht. Muss da nicht noch irgendwas in Thunderbird angepasst werden?

    Thunderbird 138.0.1 64bit

  • edvoldi
    Moderator
    Reactions Received
    281
    Posts
    7,582
    Member since
    23. Dec. 2005
    Helpful answers
    32
    • October 8, 2019 at 2:22 PM
    • #4
    Quote from hwww

    Muss da nicht noch irgendwas in Thunderbird angepasst werden?

    Siehe mein Beitrag oben, habe in nachträglich noch einmal angepasst.


    Gruß
    EDV-Oldi

    WIN11 Home Version 25H2 (Build 26200.8524)

    Thunderbird 140.11.1esr (64-Bit)
    Thunderbird - Beta 152.0b3 (64-Bit)
    Thunderbird - Daily 153.0a1 (64-Bit)

    Firefox 151.0.3 (64-Bit)

    Thunderbird-Kalender: FAQ / Erweiterungen für den Kalender / Meine Erweiterungen

    Keine Forenhilfe per Konversation!

  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 8, 2019 at 2:40 PM
    • #5

    Also habe ich gemacht mit meinen gespeicherten Scripts. Ich glaube aber das das noch alte sind? Wo bekomme ich die neusten her?

    Thunderbird 138.0.1 64bit

  • edvoldi
    Moderator
    Reactions Received
    281
    Posts
    7,582
    Member since
    23. Dec. 2005
    Helpful answers
    32
    • October 8, 2019 at 2:42 PM
    • #6
    Quote from hwww

    Ich glaube aber das das noch alte sind? Wo bekomme ich die neusten her?

    Das solltest Du hier finden:

    Anpassung per userChromeJS (per Script) - ab Version 60+

    Nach dem einspielen Thunderbird einmal im abgesichertem Modus starten und sofort wieder normal starten.


    Gruß
    EDV-Oldi

    WIN11 Home Version 25H2 (Build 26200.8524)

    Thunderbird 140.11.1esr (64-Bit)
    Thunderbird - Beta 152.0b3 (64-Bit)
    Thunderbird - Daily 153.0a1 (64-Bit)

    Firefox 151.0.3 (64-Bit)

    Thunderbird-Kalender: FAQ / Erweiterungen für den Kalender / Meine Erweiterungen

    Keine Forenhilfe per Konversation!

  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 8, 2019 at 3:15 PM
    • #7

    Hallo edvoldi

    Habe nun alles so gemacht wie du oben beschrieben hast und es hat geklappt !!! Waren wohl doch noch alte Scripte die ich hatte.

    Vielen Dank und noch eine schöne Woche

    Thunderbird 138.0.1 64bit

  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 9, 2019 at 10:44 AM
    • #8

    Hallo edvoldi

    Muss mich noch mal bei dir melden. Es funktioniert alles wie schon geschrieben nur wie bekomme ich die Schrift für das hier dicker bzw. größer:

    "var text = " Thunderbird - G Profile " + AppConstants.MOZ_APP_VERSION_DISPLAY;" (habe das so geändert).

    Danke schon mal hwww

    Thunderbird 138.0.1 64bit

  • edvoldi
    Moderator
    Reactions Received
    281
    Posts
    7,582
    Member since
    23. Dec. 2005
    Helpful answers
    32
    • October 9, 2019 at 11:19 AM
    • #9

    Hallo hwww,

    teste einmal diesen Code

    Code
    ClockLabel.setAttribute("style", "padding-top:0px; padding-left:10px;color:blue;font-size:18px");

    font-size:18px ist sehr groß kannst Du nach Deinem Bedarf anpassen.


    Gruß
    EDV-Oldi

    WIN11 Home Version 25H2 (Build 26200.8524)

    Thunderbird 140.11.1esr (64-Bit)
    Thunderbird - Beta 152.0b3 (64-Bit)
    Thunderbird - Daily 153.0a1 (64-Bit)

    Firefox 151.0.3 (64-Bit)

    Thunderbird-Kalender: FAQ / Erweiterungen für den Kalender / Meine Erweiterungen

    Keine Forenhilfe per Konversation!

  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 9, 2019 at 11:28 AM
    • #10

    Hallo

    Wenn der Code in die "userChrome.css" kommt dann funktioniert es leider nicht. Oder wo kommt er hin?

    Thunderbird 138.0.1 64bit

  • edvoldi
    Moderator
    Reactions Received
    281
    Posts
    7,582
    Member since
    23. Dec. 2005
    Helpful answers
    32
    • October 9, 2019 at 11:30 AM
    • #11

    Du musst den Code im Script ändern. Der ist fast kannst unten.

    WIN11 Home Version 25H2 (Build 26200.8524)

    Thunderbird 140.11.1esr (64-Bit)
    Thunderbird - Beta 152.0b3 (64-Bit)
    Thunderbird - Daily 153.0a1 (64-Bit)

    Firefox 151.0.3 (64-Bit)

    Thunderbird-Kalender: FAQ / Erweiterungen für den Kalender / Meine Erweiterungen

    Keine Forenhilfe per Konversation!

  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 9, 2019 at 11:35 AM
    • #12

    Super! Habe es gefunden und geändert. Funktioniert! Hätte aber auch vorher besser nachsehen könne.

    Grüße hwww

    Thunderbird 138.0.1 64bit

  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 10, 2019 at 10:48 AM
    • #13

    Hallo edvoldi noch mal

    Müsste dich noch mal Belästigen. Wäre es noch möglich so eine Startuhr einzubauen die beim Start von TB losläuft (siehe Bild).

    Hatte versucht das aus dem Firefox-Code zu kopieren. Das war aber ein Schuss daneben.

    Danke im voraus hwww

    Thunderbird 138.0.1 64bit

  • edvoldi
    Moderator
    Reactions Received
    281
    Posts
    7,582
    Member since
    23. Dec. 2005
    Helpful answers
    32
    • October 10, 2019 at 11:18 AM
    • #14
    Quote from hwww

    Hatte versucht das aus dem Firefox-Code zu kopieren.

    Schicke mir bitte einmal den Code.


    Gruß
    EDV-Oldi

    WIN11 Home Version 25H2 (Build 26200.8524)

    Thunderbird 140.11.1esr (64-Bit)
    Thunderbird - Beta 152.0b3 (64-Bit)
    Thunderbird - Daily 153.0a1 (64-Bit)

    Firefox 151.0.3 (64-Bit)

    Thunderbird-Kalender: FAQ / Erweiterungen für den Kalender / Meine Erweiterungen

    Keine Forenhilfe per Konversation!

  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 10, 2019 at 12:43 PM
    • #15

    Hallo

    Da ich so gut wie keine Ahnung von den Scripts habe hatte ich einfach etwas rum gespielt mit Kopieren aus dem Firefox-Code von #1. Habe einfach ein paar Zeilen wo was mit Sek. usw. steht in den Code von TB kopiert. Glaube diese Zeilen:


    if( count == 1 ) { var counter = new Date( 1000 * sec ).toISOString().substr( 11 , 8 ); // .replace(/^[0:]+/, '') // if you want to replace zeroes and colons timestr = timestr + ' (' + counter + ')'; sec++; }


    Habe aber gemerkt das das keinen Sinn macht da der ganze Aufbau der Code doch recht Unterschiedlich ist.Gruß hwww

    Thunderbird 138.0.1 64bit

    Edited once, last by hwww (October 10, 2019 at 1:02 PM).

  • edvoldi
    Moderator
    Reactions Received
    281
    Posts
    7,582
    Member since
    23. Dec. 2005
    Helpful answers
    32
    • October 10, 2019 at 1:15 PM
    • #16

    Ja da kann ich im Moment auch nicht weiter helfen.


    Gruß
    EDV-Oldi

    WIN11 Home Version 25H2 (Build 26200.8524)

    Thunderbird 140.11.1esr (64-Bit)
    Thunderbird - Beta 152.0b3 (64-Bit)
    Thunderbird - Daily 153.0a1 (64-Bit)

    Firefox 151.0.3 (64-Bit)

    Thunderbird-Kalender: FAQ / Erweiterungen für den Kalender / Meine Erweiterungen

    Keine Forenhilfe per Konversation!

  • edvoldi
    Moderator
    Reactions Received
    281
    Posts
    7,582
    Member since
    23. Dec. 2005
    Helpful answers
    32
    • October 10, 2019 at 1:36 PM
    • #17

    Hallo hwww,

    ich habe jetzt einmal Dein Script genau angesehen und zwei Änderungen vorgenommen.

    Jetzt sollte Deine Version auch in Thunderbird laufen.

    CSS
    (function() {
        function doDatClock() {
            var timestr = new Date().toLocaleDateString( locale , options );
            
            const blanks = '     ';
            let i = timestr.lastIndexOf(',');
            timestr = timestr.substring(0,i) + blanks + timestr.substring(i+1);
            
            if( count == 1 ) {
                var counter = new Date( 1000 * sec ).toISOString().substr( 11 , 8 ); // .replace(/^[0:]+/, '') // if you want to replace zeroes and colons
                timestr = timestr + '       (' + counter + ')';
                sec++;
            }
            ClockLabel.setAttribute( 'value', timestr );
        }
    
        var count = 1; // if you don't want a counter set this to zero
        var agent = 1; // if you just want the clock set this to zero
        var language = 'de-DE'; // locale, e.g. 'de-DE' , 'en-US' , 'fr-FR'
        var personalText = ''; // your personal text here
        var cssColor = 'black'; // Font Color
    
        var css = 'margin-left: 30px; padding-top: 4px !important; padding-left: 0px; color: ' + cssColor + '; font-weight: 600; text-shadow: none; width: 275px;';
        var cssA = 'margin-left: 70px; width: auto;';
    
        var options = {
            weekday: 'long',
            year: 'numeric',
            month: 'long',
            day: 'numeric',
                       hour: '2-digit',
            minute: '2-digit',
            second: '2-digit'
        };
    
        var sec = 0;
    
        var locale = language || window.navigator.languages[0];
    
        var position = document.getElementById('helpMenu');
    
        var ClockLabel = document.createElement('label');
        ClockLabel.setAttribute('id', 'statusbar-clock-display');
        ClockLabel.setAttribute('class', 'statusbarpanel-text');
        ClockLabel.setAttribute('style', css);
        position.parentNode.insertBefore(ClockLabel, position.nextSibling);
    
        if( agent == 1 ) {
            var AgentLabel = document.createElement('label');
            AgentLabel.setAttribute('id', 'statusbar-agent-display');
            AgentLabel.setAttribute('class', 'statusbarpanel-text');
            AgentLabel.setAttribute('style', css + cssA);
            var FFstr = window.navigator.userAgent.split(' ');
            var FF = FFstr[FFstr.length-1].replace( '/' , ' ' );
            var text  = " Firefox - G  Profile  " + AppConstants.MOZ_APP_VERSION_DISPLAY;
            AgentLabel.setAttribute( 'value', text );
            position.parentNode.insertBefore(AgentLabel, position.nextSibling);
        }
    
        if( count == 1 ) {
            ClockLabel.addEventListener('dblclick', function() { sec = 0; });
        }
    
        window.setInterval( doDatClock , 1000 );
    })();
    Display More


    Gruß
    EDV-Oldi

    WIN11 Home Version 25H2 (Build 26200.8524)

    Thunderbird 140.11.1esr (64-Bit)
    Thunderbird - Beta 152.0b3 (64-Bit)
    Thunderbird - Daily 153.0a1 (64-Bit)

    Firefox 151.0.3 (64-Bit)

    Thunderbird-Kalender: FAQ / Erweiterungen für den Kalender / Meine Erweiterungen

    Keine Forenhilfe per Konversation!

  • hwww
    Member
    Reactions Received
    2
    Posts
    135
    Member since
    3. Aug. 2012
    • October 10, 2019 at 2:30 PM
    • #18
    Quote from edvoldi

    Jetzt sollte Deine Version auch in Thunderbird laufen.

    Hallo

    Ja Super! Genau wie in Firefox. Möchte mich recht herzlich für Deine Mühe bei Dir bedanken.

    Schönes Wochenende noch hwww

    Thunderbird 138.0.1 64bit

  • edvoldi
    Moderator
    Reactions Received
    281
    Posts
    7,582
    Member since
    23. Dec. 2005
    Helpful answers
    32
    • October 10, 2019 at 2:33 PM
    • #19

    Ich habe zuerst über sehen das dieser Code createXULElement in Thunderbird nicht fuktioniert und habe ihn wieder umbenannt nach createElement ;)


    Gruß
    EDV-Oldi

    WIN11 Home Version 25H2 (Build 26200.8524)

    Thunderbird 140.11.1esr (64-Bit)
    Thunderbird - Beta 152.0b3 (64-Bit)
    Thunderbird - Daily 153.0a1 (64-Bit)

    Firefox 151.0.3 (64-Bit)

    Thunderbird-Kalender: FAQ / Erweiterungen für den Kalender / Meine Erweiterungen

    Keine Forenhilfe per Konversation!

  • Community-Bot September 3, 2024 at 8:40 PM

    Closed the thread.

Current app version

  • Thunderbird 151.0.1 veröffentlicht

    Thunder May 27, 2026 at 11:54 PM

Current 140 ESR version

  • Thunderbird 140.11.1 ESR veröffentlicht

    Thunder May 27, 2026 at 12:00 AM

No Advertisements

There are no advertisements here. Maybe you give the website owner (Alexander Ihrig - aka "Thunder") instead something to be able to finance these sites in the long run. Many Thanks!

Thank you for the support!

Coffee to be spent?

Donate now via Paypal*

*Forwarding to PayPal.Me

Thunderbird Mail DE
  1. Imprint & Contact
  2. Privacy Policy
    1. Cookie Policy
  3. Terms of Use
  4. Donation Call for Thunderbird
Help for this website
  • All website support articles
  • How to use website search
  • How to create a forums user account
  • How to create and edit a forums thread
  • How to reset your forums password
Copyright © 2003-2026 Thunderbird Mail DE

You are NOT on an official page of the Mozilla Foundation. Mozilla®, mozilla.org®, Firefox®, Thunderbird™, Bugzilla™, Sunbird®, Seamonkey®, XUL™ and the Thunderbird logo are (among others) registered trademarks of the Mozilla Foundation.

Powered by WoltLab Suite™