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

Scripts funktionieren in TB 102 nicht mehr

    • 102.*
    • Windows
  • bananovic
  • July 3, 2022 at 4:17 PM
  • Closed
  • Thread is Resolved
  • bananovic
    Member
    Reactions Received
    4
    Posts
    114
    Member since
    23. Jul. 2014
    • July 3, 2022 at 4:17 PM
    • #1

    In TB 102 funktionieren die Scripts RestartThunderbird.uc.js, BrowserToolbox.uc.js und aboutconfig-button.uc.js nicht mehr. Wie kann man dem abhelfen?

  • milupo
    Guest
    • July 3, 2022 at 4:45 PM
    • #2
    Quote from bananovic

    Wie kann man dem abhelfen?

    Hallo bananovic,

    ich weiß nicht genau, ob es wirklich die Ursache ist, aber probiere es mal aus: Gehe in das Installationsverzeichnis von TB und dort in den Ordner userChromeJS, den du einst dort hineinkopiert hast. Darin befindet sich die Datei utilities.js. Ersetze bitte folgende Zeilen:

    In Zeile 114

    JavaScript
    .loadSubScriptWithOptions(userChrome.getURLSpecFromFile(aFile),

    durch

    JavaScript
    .loadSubScriptWithOptions(userChrome.getURLSpecFromActualFile(aFile),

    In Zeile 143

    JavaScript
    document.loadOverlay(userChrome.getURLSpecFromFile(aFiles.shift()), null);

    durch

    JavaScript
    document.loadOverlay(userChrome.getURLSpecFromActualFile(aFiles.shift()), null);
  • schlingo
    Senior Member
    Reactions Received
    750
    Posts
    7,007
    Member since
    20. Jul. 2009
    Helpful answers
    49
    • July 3, 2022 at 5:39 PM
    • #3
    Quote from bananovic

    Wie kann man dem abhelfen?

    Hallo :)

    für ersteres benutze ich Restart Button, bisher allerdings noch mit TB 91, bis 102 produktiv einsetzbar ist.

    Gruß Ingo

    Threema - Sicherer und privater Messenger

    Meine Threema-ID

    Warum Threema?

  • MSFreak
    Senior Member
    Reactions Received
    1,102
    Posts
    4,012
    Member since
    23. Oct. 2019
    Helpful answers
    83
    • July 3, 2022 at 5:44 PM
    • #4
    Quote from schlingo

    für ersteres benutze ich Restart Button, bisher allerdings noch mit TB 91, bis 102 produktiv einsetzbar ist.

    ... funktioniert auch mit TB 102.

    Gruß Micha

  • bananovic
    Member
    Reactions Received
    4
    Posts
    114
    Member since
    23. Jul. 2014
    • July 3, 2022 at 6:14 PM
    • #5
    Quote from milupo

    ich weiß nicht genau, ob es wirklich die Ursache ist, aber probiere es mal aus: Gehe in das Installationsverzeichnis von TB und dort in den Ordner userChromeJS, den du einst dort hineinkopiert hast. Darin befindet sich die Datei utilities.js. Ersetze bitte folgende Zeilen:

    Das funktioniert leider nicht.

  • nowar
    Member
    Reactions Received
    7
    Posts
    116
    Member since
    8. Apr. 2022
    Helpful answers
    5
    • July 3, 2022 at 7:25 PM
    • #6

    Config Button 1.8 [by Dillinger]

  • milupo
    Guest
    • July 3, 2022 at 8:05 PM
    • #7
    Quote from bananovic

    Das funktioniert leider nicht.

    Aber die Zeilen waren noch zu ersetzen? Hast du Thunderbird mal neu gestartet und dabei in den Informationen zur Fehlerbehebung den Start-Cache gelöscht (sprich: der Skript-Cache wird damit gelöscht)?

  • milupo
    Guest
    • July 3, 2022 at 8:44 PM
    • #8

    bananovic Es gibt offensichtlich noch andere Änderungen in der utilities.js. Ersetze den Inhalt deiner utilities.js durch folgenden:

    JavaScript
    // utilities.js
    
    /* ***** BEGIN LICENSE BLOCK *****
     * Version: MPL 1.1/GPL 2.0/LGPL 2.1
     *
     * The contents of this file are subject to the Mozilla Public License Version
     * 1.1 (the "License"); you may not use this file except in compliance with
     * the License. You may obtain a copy of the License at
     * http://www.mozilla.org/MPL/
     *
     * Software distributed under the License is distributed on an "AS IS" basis,
     * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
     * for the specific language governing rights and limitations under the
     * License.
     *
     * The Original Code is the userChromeJS utilities.
     *
     * The Initial Developer of the Original Code is
     * alta88 <alta88@gmail.com>
     *
     * Portions created by the Initial Developer are Copyright (C) 2014
     * the Initial Developer. All Rights Reserved.
     *
     * Contributor(s):
     * aborix <www.camp-firefox.de/forum>
     *
     * Alternatively, the contents of this file may be used under the terms of
     * either the GNU General Public License Version 2 or later (the "GPL"), or
     * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
     * in which case the provisions of the GPL or the LGPL are applicable instead
     * of those above. If you wish to allow use of your version of this file only
     * under the terms of either the GPL or the LGPL, and not to allow others to
     * use your version of this file under the terms of the MPL, indicate your
     * decision by deleting the provisions above and replace them with the notice
     * and other provisions required by the GPL or the LGPL. If you do not delete
     * the provisions above, a recipient may use your version of this file under
     * the terms of any one of the MPL, the GPL or the LGPL.
     *
     * ***** END LICENSE BLOCK ***** */
    
    /* ........ Utility functions ............................................... */
    
    var userChrome = {
    
      path: null,
      dirToken: null,
      ignoreCache: false,
    
      get loadOverlayDelay () {
        if (!this._loadOverlayDelay)
          this._loadOverlayDelay = 500;
        return this._loadOverlayDelay;
      },
    
      set loadOverlayDelay(delay) {
        this._loadOverlayDelay = delay;
      },
    
      get loadOverlayDelayIncr() {
        if (!this._loadOverlayDelayIncr)
          this._loadOverlayDelayIncr = 1600;
        return this._loadOverlayDelayIncr;
      },
    
      set loadOverlayDelayIncr(delay) {
        this._loadOverlayDelayIncr = delay;
      },
    
      import: function(aPath, aRelDirToken) {
        let file;
        this.path = aPath;
        this.dirToken = aRelDirToken;
    
        if (aRelDirToken) {
          // Relative file
          let absDir = this.getAbsoluteFile(aRelDirToken);
          if (!absDir)
            return;
          let pathSep = absDir.path.match(/[\/\\]/)[0];
          file = absDir.path + (aPath == "*" ?
              "" : pathSep + aPath.replace(/[\/\\]/g, pathSep));
        }
        else
          // Absolute file
          file = aPath;
    
        file = this.getFile(file);
        if (!file)
          return;
        if (file.isFile()) {
          if (/\.js$/i.test(file.leafName))
            this.loadScript(file, aRelDirToken, null);
          else if (/\.xul$/i.test(file.leafName)) {
            let xul_files = [];
            xul_files.push(file);
            this.loadOverlay(xul_files, this.dirToken, null, this.loadOverlayDelay);
    //      this.loadOverlayDelay = this.loadOverlayDelay + this.loadOverlayDelayIncr;
          }
          else
            this.log("File '" + this.path +
                     "' does not have a valid .js or .xul extension.", "userChrome.import");
        }
        else if (file.isDirectory())
          this.importFolder(file);
        else
          this.log("File '" + this.path +
                   "' is neither a file nor a directory.", "userChrome.import");
      },
    
      loadScript: function(aFile, aFolder, aRelDirToken) {
        setTimeout(function() {
          Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
                    .getService(Components.interfaces.mozIJSSubScriptLoader)
                    .loadSubScriptWithOptions(userChrome.getURLSpecFromActualFile(aFile),
                                              {target: window,
                                               charset: userChrome.charSet,
                                               ignoreCache: userChrome.ignoreCache});
          // log it
          userChrome.log(aRelDirToken ? ("[" + aRelDirToken + "]/" +
              (aFolder && aFolder != "*" ? aFolder + "/" : "") + aFile.leafName) :
              aFile.path, "userChrome.loadScript");
        }, 0);
      },
    
      // XXX: Due to bug 330458, an overlay must finish before another can be
      // called, otherwise neither are successful.  Implementing an observer to
      // serialize is better left as a fix in the core bug.  Here, settimout values
      // are set to minimize but there is no quarantee; overlay cdata (if any)
      // needs to consider overlay completions and logging does not strictly mean
      // an overlay has completed, rather that the overlay file has been invoked.
    
      loadOverlay: function(aFiles, aRelDirToken, aFolder, aDelay) {
    //userChrome.log(aDelay+" multiple import delay", userChrome.loadOverlay);
        // Increment multiple import delay
        this.loadOverlayDelay = this.loadOverlayDelay + this.loadOverlayDelayIncr;
        setTimeout(function() {
          if (aFiles.length > 0) {
    //userChrome.log(userChrome.loadOverlayDelay+" inter folder delay", userChrome.loadOverlay);
            // log it
            userChrome.log(aRelDirToken ? ("[" + aRelDirToken + "]/" +
                (aFolder && aFolder != "*" ? aFolder + "/" : "") + aFiles[0].leafName) :
                aFiles[0].path, "userChrome.loadOverlay");
            document.loadOverlay(userChrome.getURLSpecFromActualFile(aFiles.shift()), null);
            setTimeout(arguments.callee, userChrome.loadOverlayDelay);
          }
        }, aDelay);
      },
    
      // Include all files ending in .js and .xul from passed folder
      importFolder: function(aFolder) {
        let files = aFolder.directoryEntries
                           .QueryInterface(Components.interfaces.nsISimpleEnumerator);
        let xul_files = [];
    
        while (files.hasMoreElements()) {
          let file = files.getNext().QueryInterface(Components.interfaces.nsIFile);
          if (/\.js$/i.test(file.leafName) && file.leafName != "userChrome.js")
            this.loadScript(file, this.path, this.dirToken);
          else if (/\.xul$/i.test(file.leafName)) {
            xul_files.push(file);
          }
        }
    
        if (xul_files.length > 0)
          this.loadOverlay(xul_files, this.dirToken, this.path);
      },
    
      getFile: function(aPath, aRelDirToken) {
        try {
          let file = Components.classes["@mozilla.org/file/local;1"]
                               .createInstance(Components.interfaces.nsIFile);
          file.initWithPath(aPath);
          // Bad file doesn't throw on initWithPath, need to test
          if (file.exists())
            return file;
          this.log("Invalid file '" + this.path + (this.dirToken ?
              ("' or file not found in directory with token '" + this.dirToken) :
              "") + "' or other access error.", "userChrome.getFile");
        }
        catch (e) {
          // Bad folder throws on initWithPath
          this.log("Invalid folder '" + this.path + (this.dirToken ?
              ("' or folder not found in directory with token '" + this.dirToken) :
              "") + "' or other access error.", "userChrome.getFile");
        }
        return null;
      },
    
      getAbsoluteFile: function(aRelDirToken) {
        try {
          let absDir = Components.classes["@mozilla.org/file/directory_service;1"]
                                 .getService(Components.interfaces.nsIProperties)
                                 .get(aRelDirToken, Components.interfaces.nsIFile);
          return absDir;
        }
        catch (e) {
          this.log("Invalid directory name token '" + this.dirToken +
                   "' or directory cannot be accessed.", "userChrome.getAbsoluteFile");
          return null;
        }
      },
    
      getURLSpecFromActualFile: Components.classes["@mozilla.org/network/io-service;1"]
                                    .getService(Components.interfaces.nsIIOService)
                                    .getProtocolHandler("file")
                                    .QueryInterface(Components.interfaces.nsIFileProtocolHandler)
                                    .getURLSpecFromActualFile,
    
      /* Console logger */
      log: function(aMsg, aCaller) {
        Components.classes["@mozilla.org/consoleservice;1"]
                  .getService(Components.interfaces.nsIConsoleService)
                  .logStringMessage(this.date + " userChromeJS " +
                                    (aCaller ? aCaller +": " : "") + aMsg);
      },
    
      get dateFormat() {
        if (!this._dateFormat)
          this._dateFormat = "%Y-%m-%d %H:%M:%S";
        return this._dateFormat;
      },
    
      set dateFormat(format) {
        this._dateFormat = format;
      },
    
      get date() {
        let date = new Date();
    //  return date.toLocaleFormat(this.dateFormat);
        try {
          date = date.toLocaleFormat(this.dateFormat);
        } catch(e) {
          date = date.toString();
        };    
        return date;
      },
    
      set charSet(val) {
        this._charSet = val;
      },
    
      get charSet() {
        if (!this._charSet)
          this._charSet = "UTF-8"; // use "UTF-8". Defaults to ascii if null.
        return this._charSet;
      }
    
    };
    Display More
  • milupo
    Guest
    • July 3, 2022 at 8:51 PM
    • #9

    Ergänzung: Starte TB auf jeden Fall neu, unter Umständen musst du nochmal den Start-Cache löschen, falls die Skript nach einem einfachen Neustart von TB noch nicht wieder aktiv sind.

  • bananovic
    Member
    Reactions Received
    4
    Posts
    114
    Member since
    23. Jul. 2014
    • July 4, 2022 at 10:56 AM
    • #10

    Ich habe deine utilities.js genommen, ich habe auch den Cache in Einstellungen / Allgemein / Speicherplatz geleert (sogar mehrmals), habe TB neu gestartet, auch im Fehlerbehebungsmodus (auch mehrmals) - das Ganze hat leider nichts geändert. Auch das Löschen des Start-Caches in "Informationen zur Fehlerbehebung" und Neustart hat nichts gebracht. Beim Start von TB blitzen die Scriptsymbole oben rechts kurz auf und verschwinden wieder.

    Update:

    Jetzt geht es. Die Symbole befanden sich in "Symbole anpassen". Ich brauchte sie nur nach oben an den gewohnten Platz zu ziehen. Deine utilities.js macht den Unterschied aus. Vielen Dank.

    Edited once, last by bananovic (July 4, 2022 at 11:08 AM).

  • milupo
    Guest
    • July 4, 2022 at 2:10 PM
    • #11
    Quote from bananovic

    Jetzt geht es. Die Symbole befanden sich in "Symbole anpassen". Ich brauchte sie nur nach oben an den gewohnten Platz zu ziehen. Deine utilities.js macht den Unterschied aus. Vielen Dank.

    Schön, dass es nun doch funktioniert. Das kann passieren, dass sich die Symbole im Anpassen-Fenster wiederfinden, manche Skripte installieren die Symbole von vornherein in das Anpassen-Fenster und man muss sie von Anfang an erst von dort in die Symbolleiste ziehen. Auch wenn du versehentlich im Anpassen-Fenster auf „Standard wiederherstellen“ klickst, werden alle Symbole ins Anpassen-Fenster zurück verschoben.

    Ansonsten: Gern geschehen.

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

    Closed the thread.

Current app version

  • Thunderbird 152.0.1 veröffentlicht

    Thunder July 4, 2026 at 1:02 PM

Current 140 ESR version

  • Thunderbird 140.12.1 ESR veröffentlicht

    Thunder July 4, 2026 at 1:05 PM

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

Similar Threads

  • TB 102 Farben Icons und Orner anpassen

    • thb
    • July 1, 2022 at 1:08 PM
    • Manuelle Anpassungen per CSS oder Script
  • Thunderbird Beta unbenutzbar (Versionen 93, 94, 95, 96, 97, 98, 99, 100, 101 und 102 bis beta 6) - Problem gelöst in 102 beta 7

    • jorgk3
    • November 27, 2021 at 9:52 AM
    • Thunderbirds Entwicklerversionen
  • Update von 31.5.0 auf 91.10.0 (64bit) - Passwörter werden nicht gespeichert und auch sonst geht nichts mehr

    • senfoelsuppe
    • June 14, 2022 at 4:01 PM
    • Allgemeines Arbeiten / Konten einrichten / Installation & Update
  • Emails der lokalen inbox nicht mehr sichtbar; Backup funktioniert nicht

    • Legolas1309
    • March 7, 2022 at 6:43 PM
    • Allgemeines Arbeiten / Konten einrichten / Installation & Update
  • OPENPGP und andere funktionierende Einstellungen aus defektem TB-Profil übernehmen

    • ByteRyder
    • November 21, 2021 at 7:48 PM
    • OpenPGP Verschlüsselung & Unterschrift
  • PGP/Enigmail/TB78 - Stand der Dinge

    • wicki_w
    • April 22, 2021 at 5:51 PM
    • OpenPGP Verschlüsselung & Unterschrift
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™