Also ich benütze diese 2 Scripte.. jetzt funktionieren beide..
Code
// Neuer Tab bei Klick in der Bibliothek auf einen Link
(function() {
if (location.href !== '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.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('goPopup');
historyPopup.setAttribute('onpopupshowing', '(' + onPopupshowing.toString() + ')()');
})();
Alles anzeigen
Code
// Neuer Tab bei Klick im Menü Chronik auf einen Link
// ==UserScript==
// @name newtabfromhistory.uc.js
// @namespace https://www.camp-firefox.de/forum/viewtopic.php?p=1090093#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() + ')()');
})();
Alles anzeigen
PS: Beim Ersten Zeile 11 und beim Zweiten Zeile 19 abgeändert..
