nach dem Update auf 152 Probleme mit 2 Scripten

  • Firefox-Version
    152.0
    Betriebssystem
    Windows 11

    Ich habe 2 Scripte, die mir das Leben mit Lesezeichen & Co. leichter machen, denn ich möchte Lesezeichen und Chronikeinträge immer in einem neuen Tab rechts außen öffnen, ohne dass der Tab den Focus erhält. Ich nutze beide Scripte seit Jahren.
    Seit dem letzten Update von heute funktionieren sie nicht mehr. Ich muss die Links über die rechte Maustaste öffnen und sie überschreiben den aktuellen Tab.


    Dieses Script öffnet Lesezeichen in einem neuen Tab:

    (function() {
    if (location == 'chrome://browser/content/browser.xul') {
    eval('PlacesUIUtils._openTabset = ' + PlacesUIUtils._openTabset.toString()
    .replace('loadInBackground,' , 'true,'));
    };
    })();


    Dieses Script öffnet Einträge aus der Chronik in einem neuen Tab:

    // ==UserScript==
    // Name newtabfromhistory.uc.js
    // Namespace https://www.camp-firefox.de/forum/viewtopi…090093#p1090093
    // @description Links aus Chronik in neuem Tab öffnen
    // @author aborix
    // @compatibility 95+
    // @version 0.0.3a
    // ==/UserScript==

    (function() {

    if (location != 'chrome://browser/content/browser.xhtml')
    return;

    PlacesUIUtils.openNodeWithEvent = function PUIU_openNodeWithEvent(aNode, aEvent) {
    let window = aEvent.target.ownerGlobal;
    let browserWindow = (window && window.document.documentElement.getAttribute('windowtype') == 'navigator:browser') ? window : BrowserWindowTracker.getTopWindow();
    let where = window.BrowserUtils.whereToOpenLink(aEvent, false, true);
    if (this.loadBookmarksInTabs) {
    if (where == 'current' && !aNode.uri.startsWith('javascript:')) {
    where = 'tab';
    }
    if (where == 'tab' && browserWindow.gBrowser.selectedTab.isEmpty) {
    where = 'current';
    }
    }
    this._openNodeIn(aNode, where, window);
    }

    let onPopupshowing = function() {
    let historyMenu = document.getElementById('history-menu');
    if (!historyMenu._placesView) {
    new HistoryMenu(event);
    historyMenu._placesView._onCommand = function HM__onCommand(aEvent) {
    let placesNode = aEvent.target._placesNode;
    if (placesNode) {
    PlacesUIUtils.openNodeWithEvent(placesNode, aEvent);
    };
    };
    };
    };

    let historyPopup = document.getElementById('historyMenuPopup');
    historyPopup.setAttribute('onpopupshowing', '(' + onPopupshowing.toString() + ')()');

    })();

  • Teste bitte, für Chronik:

    Grüße vom FuchsFan

  • Danke. Das hilft teilweise.

    Jetzt habe ich nur noch ein Problem.
    Gehe ich ins Chronik-Menü und klicke auf einen Eintrag, dann wird der aktuelle Tab überschrieben.
    Das gleiche passiert, wenn ich die gesamte Chronik anzeigen lasse und dort einen Link mit Doppelklick öffne.
    Ja, ich habe das Hamburgermenü aus und das richtige Menü an.