Hallo milupo.
Wenn Du meinst es passt dazu gerne. Vielleicht mit entsprechenden Hinweis
auf die entsprechende Änderung ab Firefox 70, denn obiges betrifft erst Firefox 70
und neuer.
Mfg.
Endor
Hallo milupo.
Wenn Du meinst es passt dazu gerne. Vielleicht mit entsprechenden Hinweis
auf die entsprechende Änderung ab Firefox 70, denn obiges betrifft erst Firefox 70
und neuer.
Mfg.
Endor
Hallo Sören.
Prima, vielen Dank !!
Funktioniert bestens.
:klasse:
Mfg.
Endor
Hallo zusammen.
Ab Firefox 70 gehen einige Scripte nicht mehr.
Unter anderem auch moretoolsmenu.uc.js
Script Code:
(function() {
const XUL_NS = 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';
var toolsPopup = $('menu_ToolsPopup');
var menu, popup;
menu = document.createXULElement("menu");
menu.setAttribute("id", "moreTools-menu");
menu.setAttribute("label", "Werkzeug");
menu.setAttribute("accesskey", "W");
popup = document.createXULElement("menupopup");
popup.setAttribute("id", "menu_MoreToolsPopup");
$A(toolsPopup.childNodes).forEach(absorb);
$W('popupshowing popupshown popuphiding popuphidden').forEach(function(type) {
popup.addEventListener(type, MTM_forwardEvent, true);
});
menu.appendChild(popup);
$('main-menubar').insertBefore(menu, $('tools-menu').nextSibling);
toolsPopup.addEventListener('DOMNodeInserted', function MTM_onDOMNodeInserted(event) {
var target = event.originalTarget;
if (target.parentNode === this)
absorb(target);
}, false);
function U(text) {
return (1 < '?'.length) ? decodeURIComponent(escape(text)) : text;
};
function $A(arr) {
return Array.slice(arr);
};
function $W(str) {
return str.split(' ');
};
function $(id) {
return document.getElementById(id);
};
function isMoreTools(item) {
switch (item.getAttribute('id')) {
case 'menu_search':
case 'browserToolsSeparator':
case 'menu_openDownloads':
case 'menu_openAddons':
case 'sync-setup':
case 'sync-syncnowitem':
case 'devToolsSeparator':
case 'javascriptConsole':
case 'webConsole':
case 'menu_pageInfo':
case 'sanitizeSeparator':
case 'privateBrowsingItem':
case 'sanitizeItem':
case 'prefSep':
case 'menu_preferences':
return false;
}
return true;
}
function absorb(item) {
if (!isMoreTools(item)) return;
if (item.localName === 'menuseparator') {
setTimeout(function() {
document.adoptNode(item);
}, 0);
return;
}
var itemLabel = item.getAttribute('label').toLowerCase();
var nodes = $A(popup.children);
for (var index = 0, len = nodes.length; index < len; index++) {
if (itemLabel < nodes[index].getAttribute('label').toLowerCase()) break;
}
popup.insertBefore(item, nodes[index]);
}
function MTM_forwardEvent({type}) {
var _event = document.createEvent('PopupEvents');
_event.initMouseEvent(type, true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
toolsPopup.dispatchEvent(_event);
}
})();
Alles anzeigen
Der Grund müsste das hier sein: https://www.fxsitecompat.dev/en-CA/docs/201…een-deprecated/
Hat einer eine Idee wie man das beheben kann?
Vielen Dank im Voraus für jede Hilfe.
Mfg.
Endor
Hallo Road-Runner!
Auch von mir alles alles Gute zum Geburtstag!
Vor allem viel Gesund und Glück wünsche ich Dir.
Mfg.
Endor
Wenn auch mit Verspätung, dafür um so herzlicher auch von mir
alles alles Gute zum Geburtstag vor allem viel Gesundheit und Glück.
Mfg.
Endor
Hallo aborix
Könnte es damit auch zu tun haben: https://www.fxsitecompat.dev/en-CA/docs/201…een-deprecated/
Mfg.
Endor
Ja diese Zeile habe ich mir auch gerade angeschaut.
Hoffe Du findest eine Lösung.
Mfg.
Endor
Ja definitiv.
Edit: Eben nochmal getestet im beta 6 funktioniert alles bestens.
erst ab beta 7 nicht mehr.
Mfg.
Endor
Hallo aborix.
Ja hier auch so. Also wurde diese Änderung in Beta 7 übernommen.
Hast Du eine Idee?
Mfg.
Endor
Wenn ich mich nicht irre, glaube es gelesen zu haben, weiß aber im Moment nicht mehr wo,
ist das Attribute src nicht mehr erlaubt. Bin mir aber nicht sicher.
Mfg.
Endor
Hallo Boersenfeger.
Nein, daran liegt es nicht, denn der funktioniert ja.
Es funktioniert das Befüllen der Panelfenster mit dem Seiteninhalt nicht
spricht es öffnet sich das Panel aber die Seite die darin geladen werden soll
wird nicht geladen. Das muss man wohl jetzt anders formulieren.
Mfg.
Endor
Es müsste wahrscheinlich an dieser Zeile liegen:
getBrowser().selectedTab = getBrowser().addTab(document.getElementById("wetterfuchs-iframe").getAttribute("src"));
das ist der ganze Absatz:
openUrlFromPanel: function() {
getBrowser().selectedTab = getBrowser().addTab(document.getElementById("wetterfuchs-iframe").getAttribute("src"));
document.getElementById("wetterfuchs-panel").hidePopup();
},
Irgendwer eine Idee?
Mfg.
Endor
Kann und muss ich leider bestätigen.
Leider gibt die Browserkonsole dazu keine Info her.
Es wird nur das geladene Skript angezeigt sonst nichts.
Wenn uns da aborix nicht weiter hilft, dann weiß ich auch nicht.
Mfg.
Endor
Hallo Meister.
Du verwendest ja meinen CSS Code für die Symbole im Kontextmenü.
Der muss ab Firefox 68 geändert werden, sonst geht das Menü nicht, so wie bei Dir.
Durchsuche mal Deine diesbezüglichen Klamotten und ändere dann den entsprechende
Teil CSS Code, es ist übrigens ein eigener CSS Code den Du da irgendwo reingezimmert hast
und nur der verursacht das Problem. Das Script läuft hier ansonsten einwandfrei.
Nur mal zur Info:
Diese beiden Skripte lassen Nightly auch abstürzen, nicht beim Start aber wenn man versucht
das durch das Skript generierte Popup zu öffnen, in beiden ist eval vorhanden.
Wenn ich dann den erwähnten Eintrag in about:config umstelle geht es.
// ==UserScript==
// @name UndoListInTabmenuToo
// @namespace http://space.geocities.yahoo.co.jp/gl/alice0775
// @description UndoListInTabmenuToo.uc.js
// @include main
// @compatibility Firefox 69+
// @author Alice0775
// @version 2019/06/30 10:00 Bug 1555060 Convert <tabs> to a custom element
// @version 2019/06/24 23:00 wait for gBrowser initialized
// @version 2019/05/21 08:30 fix 69.0a1 Bug 1551320 - Replace all createElement calls in XUL documents with createXULElement
// @version 2018/05/10 60
// @version 2017/11/18 nsIPrefBranch to nsIPrefBranch
// @version 2010/09/18 00:00 4.0b7pre
// @version 2009/02/03 13:00 ツールチップにタブ内履歴を表示するようにした
// @Note タブやコンテキストメニューにもUndoClose Tab Listを追加するもの
// @OriginalCode browser.jsからpopulateUndoSubmenuを拝借し, ごにょごにょした
// @version 2018/05/09 15:00 61
// ==/UserScript==
// @version 2010/03/26 13:00 Minefield/3.7a4pre Bug 554991 - allow tab context menu to be modified by normal XUL overlays
// @version 2010/03/15 00:00 Minefield/3.7a4pre Bug 347930 - Tab strip should be a toolbar instead
// @version 2009/09/09 15:00 中クリック処理
// @version 2009/09/03 22:00 Firegox3.7a1preで動かなくなっていたのを修正(Bug 489925. getElementById should not return anonymous nodes)
// @version 2009/08/22 00:00 Firegox3.6 stringbandleの変更による
// @version 2009/04/24 00:00 #394759 [Firefox:Session Restore]-Add undo close window feature
// @version 2008/10/12 18:00 Fx3.0.4pre中クリックしたときメニューポップアップが閉じないおよびその他fix
// @version 2007/10/05 10:00
var UndoListInTabmenu = {
// -- config --
TABCONTEXTMENU : true , //Im Tabkontextmenü: anzeigen: true, nicht anzeigen: false
CONTEXTMENU : true, //Im Hauptkontextmenü: anzeigen: true , nicht anzeigen: false
// -- config end--
ss: null,
get tabContext() {
return document.getElementById("tabContextMenu");
},
init: function(){
if (this.TABCONTEXTMENU){
//タブコンテキスト
var tabContext = this.tabContext;
this.makePopup(tabContext, null, "tabContextUndoList");
}
if (this.CONTEXTMENU){
//コンテンツエリアコンテキスト
var contextMenu = document.getElementById("contentAreaContextMenu");
var refItem = document.getElementById("context-sep-stop");
this.makePopup(contextMenu, refItem, "ContextUndoList");
}
// get closed-tabs from nsSessionStore
try {
this._ss = Cc["@mozilla.org/browser/sessionstore;1"].
getService(Ci.nsISessionStore);
} catch(x) {
this._ss = SessionStore;
}
},
makePopup: function(popup, refItem, id){
var menu;
//label
const locale = "de";
if (this.getVer() > 3.0) {
// "Recently Closed Windows"
menu = document.createXULElement("menu");
menu.setAttribute("id", "historyUndoWindowMenu3");
menu.setAttribute("label", "K\u00FCrzlich geschlossene Fenster");
menu.setAttribute("accesskey", "F");
menu.setAttribute("disabled", "true");
popup.insertBefore(menu, refItem);
this.historyUndoWindowPopup3 = menu = menu.appendChild(document.createXULElement("menupopup"));
menu.setAttribute("id", "historyUndoWindowPopup3");
menu.setAttribute("onpopupshowing", "UndoListInTabmenu.populateUndoWindowSubmenu();");
}
//UndoClose Tab List 最近閉じたタブ
const LABELTEXT = locale.indexOf("ja") == -1?"K\u00FCrzlich geschlossene Tabs":"\u6700\u8fd1\u9589\u3058\u305f\u30bf\u30d6"; //create menu
menu = document.createXULElement("menu");
menu.setAttribute("label", LABELTEXT);
menu.setAttribute("accesskey", "L");
if (id)
menu.setAttribute("id", id);
//menu.setAttribute("disabled", true);
var menupopup = document.createXULElement("menupopup");
if (this.getVer()<3) {
menupopup.setAttribute("onpopupshowing", "UndoListInTabmenu.populateUndoSubmenu(this);");
} else if (this.getVer()<3.6) {
menupopup.setAttribute("onpopupshowing", "UndoListInTabmenu.populateUndoSubmenu3(this);");
} else {
menupopup.setAttribute("onpopupshowing", "UndoListInTabmenu.populateUndoSubmenu36(this);");
}
menu.appendChild(menupopup);
popup.insertBefore(menu, refItem);
//add event listener
popup.addEventListener('popupshowing',function(event) {
if (UndoListInTabmenu.getVer() > 3.0)
UndoListInTabmenu.toggleRecentlyClosedWindows();
// no restorable tabs, so make sure menu is disabled, and return
if (UndoListInTabmenu._ss.getClosedTabCount(window) == 0) {
menu.setAttribute("disabled", true);
//menu.setAttribute("hidden", true);
return;
}
menu.removeAttribute("disabled");
//menu.setAttribute("hidden", false);
},false);
},
/**
* Populate when the history menu is opened (Fx2)
*/
populateUndoSubmenu: function(undoPopup) {
// remove existing menu items
while (undoPopup.hasChildNodes())
undoPopup.removeChild(undoPopup.firstChild);
// populate menu
var undoItems = eval("(" + UndoListInTabmenu._ss.getClosedTabData(window) + ")");
for (var i = 0; i < undoItems.length; i++) {
var m = undoPopup.appendChild(document.createXULElement("menuitem"));
m.setAttribute("label", undoItems[i].title);
m.setAttribute("value", i);
m.setAttribute("oncommand", "undoCloseTab(" + i + ");");
m.setAttribute("onclick", "UndoListInTabmenu._undoCloseMiddleClick(event);");
}
// "open in tabs"
var bundleService = Cc["@mozilla.org/intl/stringbundle;1"].
getService(Ci.nsIStringBundleService);
var stringBundle = bundleService.createBundle("chrome://browser/locale/bookmarks/bookmarks.properties");
undoPopup.appendChild(document.createXULElement("menuseparator"));
m = undoPopup.appendChild(document.createXULElement("menuitem"));
m.setAttribute("label", stringBundle.GetStringFromName("cmd_bm_openfolder"));
m.setAttribute("accesskey", stringBundle.GetStringFromName("cmd_bm_openfolder_accesskey"));
m.addEventListener("command", function() {
for (var i = 0; i < undoItems.length; i++)
undoCloseTab();
}, false);
},
/**
* Re-open a closed tab and put it to the end of the tab strip.
* Used for a middle click.
* @param aEvent
* The event when the user clicks the menu item
*/
_undoCloseMiddleClick: function PHM__undoCloseMiddleClick(aEvent) {
if (aEvent.button != 1)
return;
undoCloseTab(aEvent.originalTarget.value);
gBrowser.moveTabToEnd();
if (!aEvent.ctrlKey)
aEvent.originalTarget.parentNode.parentNode.parentNode.hidePopup();
},
/**
* Populate when the history menu is opened (Fx3)
*/
populateUndoSubmenu3: function(undoPopup) {
// remove existing menu items
while (undoPopup.hasChildNodes())
undoPopup.removeChild(undoPopup.firstChild);
// "Open All in Tabs"
var strings = gNavigatorBundle;
m = undoPopup.appendChild(document.createXULElement("menuitem"));
m.setAttribute("label", strings.getString("menuOpenAllInTabs.label"));
m.setAttribute("accesskey", strings.getString("menuOpenAllInTabs.accesskey"));
m.addEventListener("command", function() {
for (var i = 0; i < undoItems.length; i++)
undoCloseTab();
}, false);
undoPopup.appendChild(document.createXULElement("menuseparator"));
// populate menu
var undoItems = eval("(" + UndoListInTabmenu._ss.getClosedTabData(window) + ")");
for (var i = 0; i < undoItems.length; i++) {
var entries = undoItems[i].state.entries;
var tooltiptext = "";
for (var j = entries.length - 1; j > -1; j--){
if (j != entries.length - 1)
tooltiptext += "\n";
tooltiptext += parseInt(j + 1, 10) + ". " + entries[j].title;
}
var m = document.createXULElement("menuitem");
m.setAttribute("tooltiptext", tooltiptext);
m.setAttribute("label", undoItems[i].title);
if (undoItems[i].image)
m.setAttribute("image", undoItems[i].image);
m.setAttribute("class", "menuitem-iconic bookmark-item");
m.setAttribute("value", i);
m.setAttribute("oncommand", "undoCloseTab(" + i + ");");
m.setAttribute("onclick", "UndoListInTabmenu._undoCloseMiddleClick(event);");
if (i == 0)
m.setAttribute("key", "key_undoCloseTab");
undoPopup.appendChild(m);
}
// "Clear undo close tb list"
undoPopup.appendChild(document.createXULElement("menuseparator"));
m = undoPopup.appendChild(document.createXULElement("menuitem"));
m.setAttribute("label", "Liste der letzten Tabs l\u00F6schen");
m.setAttribute("accesskey", "l");
m.addEventListener("command", function() {
var max_undo = UndoListInTabmenu.getPref("browser.sessionstore.max_tabs_undo", "int", 10);
UndoListInTabmenu.setPref("browser.sessionstore.max_tabs_undo", "int", 0);
UndoListInTabmenu.setPref("browser.sessionstore.max_tabs_undo", "int", max_undo);
if (max_undo != UndoListInTabmenu.getPref("browser.sessionstore.max_tabs_undo", "int", 10))
UndoListInTabmenu.setPref("browser.sessionstore.max_tabs_undo", "int", max_undo);
}, false);
},
/**
* Populate when the history menu is opened (Fx3.6)
*/
populateUndoSubmenu36: function(undoPopup) {
// remove existing menu items
while (undoPopup.hasChildNodes())
undoPopup.removeChild(undoPopup.firstChild);
// "Open All in Tabs"
var strings = gNavigatorBundle;
m = undoPopup.appendChild(document.createXULElement("menuitem"));
m.setAttribute("label", strings.getString("menuRestoreAllTabs.label"));
//m.setAttribute("class", "menuitem-iconic bookmark-item");
m.setAttribute("accesskey", "R" /*strings.getString("menuRestoreAllTabs.accesskey")*/);
m.addEventListener("command", function() {
for (var i = 0; i < undoItems.length; i++)
undoCloseTab();
}, false);
undoPopup.appendChild(document.createXULElement("menuseparator"));
// populate menu
var undoItems = eval("(" + UndoListInTabmenu._ss.getClosedTabData(window) + ")");
for (var i = 0; i < undoItems.length; i++) {
var entries = undoItems[i].state.entries;
var tooltiptext = "";
for (var j = entries.length - 1; j > -1; j--){
if (j != entries.length - 1)
tooltiptext += "\n";
tooltiptext += parseInt(j + 1, 10) + ". " + entries[j].title;
}
var m = document.createXULElement("menuitem");
m.setAttribute("tooltiptext", tooltiptext);
m.setAttribute("label", undoItems[i].title);
if (undoItems[i].image)
m.setAttribute("image", undoItems[i].image);
m.setAttribute("class", "menuitem-iconic bookmark-item");
m.setAttribute("value", i);
m.setAttribute("oncommand", "undoCloseTab(" + i + ");");
m.setAttribute("onclick", "UndoListInTabmenu._undoCloseMiddleClick(event);");
if (i == 0)
m.setAttribute("key", "key_undoCloseTab");
undoPopup.appendChild(m);
}
// "Clear undo close tb list"
undoPopup.appendChild(document.createXULElement("menuseparator"));
m = undoPopup.appendChild(document.createXULElement("menuitem"));
m.setAttribute("label", "Liste der letzten Tabs l\u00F6schen");
m.setAttribute("accesskey", "C");
m.addEventListener("command", function() {
var max_undo = UndoListInTabmenu.getPref("browser.sessionstore.max_tabs_undo", "int", 10);
UndoListInTabmenu.setPref("browser.sessionstore.max_tabs_undo", "int", 0);
UndoListInTabmenu.setPref("browser.sessionstore.max_tabs_undo", "int", max_undo);
if (max_undo != UndoListInTabmenu.getPref("browser.sessionstore.max_tabs_undo", "int", 10))
UndoListInTabmenu.setPref("browser.sessionstore.max_tabs_undo", "int", max_undo);
}, false);
},
toggleRecentlyClosedWindows: function PHM_toggleRecentlyClosedWindows() {
// enable/disable the Recently Closed Windows sub menu
let undoPopup = this.historyUndoWindowPopup3;
// no restorable windows, so disable menu
if (this._ss.getClosedWindowCount() == 0)
this.historyUndoWindowPopup3.parentNode.setAttribute("disabled", true);
else
this.historyUndoWindowPopup3.parentNode.removeAttribute("disabled");
},
/**
* Populate when the history menu is opened
*/
populateUndoWindowSubmenu: function PHM_populateUndoWindowSubmenu() {
let undoPopup = this.historyUndoWindowPopup3;
let menuLabelString = gNavigatorBundle.getString("menuUndoCloseWindowLabel");
let menuLabelStringSingleTab =
gNavigatorBundle.getString("menuUndoCloseWindowSingleTabLabel");
// remove existing menu items
while (undoPopup.hasChildNodes())
undoPopup.removeChild(undoPopup.firstChild);
// no restorable windows, so make sure menu is disabled, and return
if (this._ss.getClosedWindowCount() == 0) {
undoPopup.parentNode.setAttribute("disabled", true);
return;
}
// enable menu
undoPopup.parentNode.removeAttribute("disabled");
let undoItems = JSON.parse(this._ss.getClosedWindowData());
// "Open All in Windows"
let m = undoPopup.appendChild(document.createXULElement("menuitem"));
m.setAttribute("label", gNavigatorBundle.getString("menuRestoreAllWindows.label"));
//m.setAttribute("class", "menuitem-iconic bookmark-item");
m.setAttribute("accesskey", "W"/*gNavigatorBundle.getString("menuRestoreAllWindows.accesskey")*/);
m.setAttribute("oncommand",
"for (var i = 0; i < " + undoItems.length + "; i++) UndoListInTabmenu.undoCloseWindow();");
undoPopup.appendChild(document.createXULElement("menuseparator"));
// populate menu
for (let i = 0; i < undoItems.length; i++) {
let undoItem = undoItems[i];
let otherTabsCount = undoItem.tabs.length - 1;
let label = (otherTabsCount == 0) ? menuLabelStringSingleTab
: PluralForm.get(otherTabsCount, menuLabelString);
let menuLabel = label.replace("#1", undoItem.title)
.replace("#2", otherTabsCount);
let m = document.createXULElement("menuitem");
m.setAttribute("label", menuLabel);
let selectedTab = undoItem.tabs[undoItem.selected - 1];
if (selectedTab.attributes.image) {
let iconURL = selectedTab.attributes.image;
// don't initiate a connection just to fetch a favicon (see bug 467828)
if (/^https?:/.test(iconURL))
iconURL = "moz-anno:favicon:" + iconURL;
m.setAttribute("image", iconURL);
}
m.setAttribute("class", "menuitem-iconic bookmark-item");
m.setAttribute("oncommand", "UndoListInTabmenu.undoCloseWindow(" + i + ");");
if (i == 0)
m.setAttribute("key", "key_undoCloseWindow");
undoPopup.appendChild(m);
}
},
/**
* Re-open a closed window.
* @param aIndex
* The index of the window (via nsSessionStore.getClosedWindowData)
* @returns a reference to the reopened window.
*/
undoCloseWindow: function (aIndex) {
// get closed-tabs from nsSessionStore
try {
ss = Cc["@mozilla.org/browser/sessionstore;1"].
getService(Ci.nsISessionStore);
} catch(x) {
ss = SessionStore;
}
let window = null;
if (ss.getClosedWindowCount() > (aIndex || 0))
window = ss.undoCloseWindow(aIndex || 0);
return window;
},
getPref: function(aPrefString, aPrefType, aDefault){
var xpPref = Components.classes['@mozilla.org/preferences-service;1']
.getService(Components.interfaces.nsIPrefBranch);
try{
switch (aPrefType){
case 'complex':
return xpPref.getComplexValue(aPrefString, Components.interfaces.nsIFile); break;
case 'str':
return xpPref.getCharPref(aPrefString).toString(); break;
case 'int':
return xpPref.getIntPref(aPrefString); break;
case 'bool':
default:
return xpPref.getBoolPref(aPrefString); break;
}
}catch(e){
}
return aDefault;
},
setPref: function(aPrefString, aPrefType, aValue){
var xpPref = Components.classes['@mozilla.org/preferences-service;1']
.getService(Components.interfaces.nsIPrefBranch);
try{
switch (aPrefType){
case 'complex':
return xpPref.setComplexValue(aPrefString, Components.interfaces.nsIFile, aValue); break;
case 'str':
return xpPref.setCharPref(aPrefString, aValue); break;
case 'int':
aValue = parseInt(aValue);
return xpPref.setIntPref(aPrefString, aValue); break;
case 'bool':
default:
return xpPref.setBoolPref(aPrefString, aValue); break;
}
}catch(e){
}
return null;
},
//Fxのバージョンを得る
//Fxのバージョン
getVer: function(){
const Cc = Components.classes;
const Ci = Components.interfaces;
var info = Cc["@mozilla.org/xre/app-info;1"].getService(Ci.nsIXULAppInfo);
var ver = parseInt(info.version.substr(0,3) * 10,10) / 10;
return ver;
}
};
// We should only start the redirection if the browser window has finished
// starting up. Otherwise, we should wait until the startup is done.
if (gBrowserInit.delayedStartupFinished) {
UndoListInTabmenu.init();
} else {
let delayedStartupFinished = (subject, topic) => {
if (topic == "browser-delayed-startup-finished" &&
subject == window) {
Services.obs.removeObserver(delayedStartupFinished, topic);
UndoListInTabmenu.init();
}
};
Services.obs.addObserver(delayedStartupFinished,
"browser-delayed-startup-finished");
}
Alles anzeigen
// ==UserScript==
// [url=home.php?mod=space&uid=467097]@Name[/url] UndoCloseTabBtn.uc.js
// [url=home.php?mod=space&uid=1079000]@namespace[/url] UndoCloseTab@gmail.com
// @description Kürzlich geschlossene Tabs wiederherstellen,
// @description Schaltfläche mit Popupmenü
// [url=home.php?mod=space&uid=321866]@author[/url] defpt
// @charset UTF-8
// @Compatibility FF57+
// [url=home.php?mod=space&uid=570682]@version[/url]
// @version v2018.04.04 Kompatiblität mit Firefox 57+ von runningcheese
// @version v2014.09.15
// ==/UserScript==
(function() {
if(document.getElementById('undoclosetab-button')) return;
CustomizableUI.createWidget({
id: 'undoclosetab-button',
label: 'Tabs wiederherstellen',
tooltiptext: 'Kürzlich geschlossene Tabs wiederherstellen',
defaultArea : CustomizableUI.AREA_NAVBAR,
onCreated: (uCTBtn) => {
uCTBtn.setAttribute('context', '_child'); //Linksklick auf die Schaltfläche, um den zuletzt geschlossenen Tab wiederherzustellen
//Mit rechtsklick, Liste, der zuletzt geschlossenen Tabs, anzeigen, dann
//zum Wiederherstellen eines Tabs, linksklick auf entsprechenden Kontextmenü Eintrag.
//如果想改成菜单形式的,那么改为(type: "menu-button",)
uCTBtn.setAttribute('command', 'History:UndoCloseTab');
uCTBtn.appendChild($C('menupopup', {
oncommand: 'event.stopPropagation();',
onpopupshowing: 'this.parentNode.populateUndoSubmenu();',
context: '',
tooltip: 'bhTooltip',
popupsinherittooltip: 'true'
}));
uCTBtn._getClosedTabCount = HistoryMenu.prototype._getClosedTabCount;
uCTBtn.populateUndoSubmenu = eval('(' + HistoryMenu.prototype.populateUndoSubmenu.toString().replace(/\.undoTabMenu/g, '') + ')');
}
});
document.insertBefore(document.createProcessingInstruction(
'xml-stylesheet', 'type="text/css" href="data:text/css;utf-8,' + encodeURIComponent('\
#undoclosetab-button menuitem {max-width: 240px;}\
#undoclosetab-button .toolbarbutton-icon {list-style-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAAB6JQAAgIMAAPn/AACA6QAAdTAAAOpgAAA6mAAAF2+SX8VGAAADgUlEQVR42mL8//8/AyUAIIBYYIzVq1dLC4mIrvr08ZPV379/vjEzMwOZnycmxMV04DMAIIAYQC4A4dXr1oU+fvLk/5/fv/9//fzl/9ev3/6vWLnqK0weFwYIIBZ0A79//crw5+9fhh+//jBYWlhz1dc3fgIqZeDh4WHk4uaqysnKmoysHiCAwAbceHRD6uLdQ0kGunoMv9hYGX79/sPw7cdvhn///jNYWJjzgtRw8/AwvHz5smzutlbN4yeP/k8Pqeo11bW5BxBAjCBnFPbHd7EIMJRoiZgx8nBwMvz+85fhJ9CQf3//Mzx9+pQBFM483FwMQG8xMDL/ZXj46cZ/9v/sk6ZWriwACCCwC25eviprEKbGeOP/AYavb34wsHCwMPz9AzTg9z+GP7x/Gf7++ws07B/Djz+/GZiYGBhYBdgYrx68JwXUyggQQGADePgFfjD+ZGHgF+Bl+P7yHZDPycDGws2gKW7GIMAhwnDs4XaGJ1/uMPz+8Z2BnYOZ4fOnzwwsrMxfgVr/AwQQ2ABpGYkv/GLcDELSfEDn/2HgFeZh8JdLYfjw6SODvqw5g4KiPMOsMw0MDEDbOYWABrz5zsAtI/wJpBcggJhABD+P8MefX38x/AU6k+EvIwPHHx4GNgYuhuuPLzCcuL2f4QswZozEHBjYGDmAdjIw/Pn+l0FCVOoNSC9AAIENEBEQe/Pjy0+GP8CA42LgZ/BXTWb48OUdw6m7+xmm7W5hePTqLoOLaigD+28+hnfv3jN8ePMJaIDMc5BegAACGyApLPX82+fvDB/ev2f4/eU/Ax+bEMOLd08ZpITkGbTl9IHp4jfDsev7GL59/8Lw+9dvhp/ffjPISio+BekFCCCwAQpiyrdfPn3F8OrVa4bHr+8zXHxwioGbjY+hwq+PwVkzmCHYMpFBS84A6Pp/DP/+/2P4+/Mvg5Ks+gOQXoAAggSimNqTb59+/v7x7SfL289vGRccmMDAxyrEsO3sKmCC+sKw9+xmhicf7gLxfQZ2QSaG/38YfkvyyoPCgBEggMAGfPnyhV2eV6vzxs7LWr9//Gf+yPKS6f/fl8zAhMgISkX//11h+M/I+A/ohL/f2P7/1VA2uvb161cOkAMAAogRmp1Znz17xsrCwsL07ds3lu/fvzOD2D9+/GCCpXk2Nra/XFxc/4Bif7i5uf9ISUn9Bgr/BggwAMhljD12v/akAAAAAElFTkSuQmCC")}\
') + '"'), document.documentElement);
function $C(name, attr) {
var el = document.createXULElement(name);
if (attr) Object.keys(attr).forEach(function(n) { return el.setAttribute(n, attr[n]);});
return el;
}
})();
Alles anzeigen
Ich habe beide entfernt, da ich den Eintrag in about:config aus Sicherhitsgründen nicht ändern will.
Mal sehen ob der Autor selber oder sonst jemand die Skripte entsprechend ändert.
Mfg.
Endor
Hallo Boersenfeger
Ja habe ich schon gesehen, dass es Aktualisierungen von Alice gibt.
Habe bereits alle auf der Platte. Muss jetzt erst mal sehen was wir
davon in der Sammlung haben und brauchen können.
Mfg.
Endor
So eben jetzt selber getestet, auch im 68er funktioniert es.
Prima.
Mfg.
Endor
Hallo milupo.
Vielen Dank.
Ist jetzt bei mir auf Github zu finden:
https://github.com/Endor8/userChr…abmenuToo.uc.js
Info an Mithrandir geht gleich raus.
Ps. Hat jemand diese Version schon im 68er getestet, geht sie da auch?
Sonst muss ich noch warten mit der Meldung an MIthrandir.
Mfg.
Endor
Ja ja, Ihr habt gut lachen....
![]()
Danke für Deine Übersetzung. :klasse:
Darf ich diese Version bei Github hochladen und an Mithrandir weitergeben?
Mfg.
Endor
So Fehler gefunden. Der saß wie üblich vor dem Monitor.
:shock: Ich werde wohl langsam zu alt für diese Scripterei.
![]()
Man sollte halt die alte Version vorher entsorgen.....
Nun passt es auch im Nightly.
Mfg.
Endor