Das kann ich mir nicht vorstellen dass es einen Unterschied zwischen Win7 und Win10 gibt :-??
Getestet habe ich mit Win10.
Das kann ich mir nicht vorstellen dass es einen Unterschied zwischen Win7 und Win10 gibt :-??
Getestet habe ich mit Win10.
Du kannst ja bitte mal etwas testen.
Sichere dir dein Script bzw. den Inhalt davon und teste dann dieses mal:
// ==UserScript==
// @name extras_config_menu.uc.js
// @compatibility Firefox 8.*, 9.*, 10.*, 11.*, 12.*, 13.*, 14.*, 15.*, 16.*, 17.*, 18.*,57.*
// @include main
// @version 1.0.20170821
// ==/UserScript==
var uProfMenu = {
// Beginn der Konfiguration
// In der folgenden Zeile (11) den Pfad zum Texteditor eintragen (unter Ubuntu 10.04 z.B.: '/usr/bin/gedit'). Bei Fehleintrag wird view_source.editor.path ausgelesen:
TextOpenExe : 'C:\\Program Files\\Notepad++\\notepad++.exe',
// Falls gewuenscht, in Zeile 15 einen Dateimanager eintragen (komplett leer lassen fuer Dateimanager des Systems) Beispiele:
// vFileManager: 'E:\\Total Commander\\Totalcmd.exe',
// vFileManager: 'C:\\Program Files (x86)\\FreeCommander\\FreeCommander.exe'
vFileManager: '',
// In der folgenden Zeile (19) 'menu' eintragen, damit es unter "Extras" als Menue erscheint, sonst die id des gewuenschten
// Elements *nach* dem der Button erscheinen soll (z.B. 'urlbar', 'searchbar', 'undoclosetab-button','abp-toolbarbutton')
// Bitte nicht so etwas wie die Menue- oder Navigationsleiste (sondern einen Menuepunkt oder einen Button mit id auf diesen Leisten) eintragen:
warpmenuto: 'helpMenu',
// Unter Linux sollte/kann versucht werden, die userChromeJS-Skripte zu sortieren, unter Windows ist das evtl. nicht noetig (die Sortierung wird Gross- und Kleinschreibung *nicht* beruecksichtigen - dazu wird die sort()-Funktion entsprechend mit einer Vergleichsfunktion aufgerufen)
sortScripts: 0, // 1 zum Erzwingen der Sortierung
// Einbindung GM-Skripte-Ordner (0: nein, 1: Greasemonkey [Profil-Verzeichnis], 2: UserScriptLoader [Chrome-Verzeichnis], 3: Scriptish [Profil-Verzeichnis]):
gmOrdner: 1,
// Einbindung CSS-Ordner (0: nein, 1: UserCSSLoader-Ordner im Chrome-Verzeichnis):
cssOrdner: 1,
// In Zeile 30 gueltige about:Adressen eintragen, die ebenfalls aufgerufen werden sollen.
// - Zum Ausblenden: abouts: [],
// - Damit die about:-Seiten nicht als Untermenue, sondern direkt als Menuepunkte aufgefuehrt werden, muss das erste Element '0' sein:
// abouts: ['0','about:about','about:addons','about:cache','about:config','about:support'],
abouts: ['about:about','about:addons','about:cache','about:config','about:crashes','about:home','about:memory','about:healthreport','about:plugins','about:support','about:preferences','about:profiles','about:performance'],
// Die normalen Firefox-Einstellungen auch zur Verfuegung stellen (0: nein, 1: ja):
showNormalPrefs: 0,
// Stellt "Skriptliste in Zwischenablage" zur Verfuegung (1: ja, 2: mit getrennter Nummerierung, 3: mit gemeinsamer Nummerierung) oder nicht (0):
enableScriptsToClip: 2,
// Um den Eintrag "Neustart" zu erzwingen (falls z.B. das andere Skript zu spaet eingebunden und nicht erkannt wird), auf 1 setzen:
enableRestart: 0,
// Ende der Konfiguration
init: function() {
if (this.warpmenuto.toLowerCase() == 'menu') {
// aufgrund des gewaehlten warpmenuto als Untermenue von Extras anlegen
var zielmenu = document.getElementById('menu_ToolsPopup');
if (zielmenu==null) {
userChrome.log("extras_config_menu.uc.js findet Zielmenue nicht, evtl. weil ein anderes Fenster als das Hauptfenster " +
"geoeffnet wurde. Falls dieser Fehler auch im Hauptfenster auftritt, bitte die vorgehende Definition " +
"von 'zielmenu' kontrollieren.");
return;
}
var menu = zielmenu.appendChild(this.createME("menu","Config Men\u00FC",0,0,"ExtraConfigMenu"));
menu.setAttribute("class","menu-iconic");
menu.setAttribute("ondblclick","getBrowser (). selectedTab = getBrowser (). addTab ('about:config');");
} else {
// als Button nach dem per warpmenuto gewaehlten Element anlegen (s. Kommentar ueber warpmenuto im Konfigurationsabschnitt)
var zielmenu = document.getElementById(this.warpmenuto);
if (zielmenu==null) {
userChrome.log("extras_config_menu.uc.js findet Zielpunkt '"+this.warpmenuto+"' nicht, evtl. weil ein anderes Fenster als das Hauptfenster " +
"geoeffnet wurde. Falls dieser Fehler auch im Hauptfenster auftritt, bitte die vorgehende Definition " +
"von 'warpmenuto' kontrollieren.");
return;
}
var menu = zielmenu.parentNode.insertBefore(document.createElement('toolbarbutton'), zielmenu.nextSibling);
menu.setAttribute("id", "ExtraConfigMenu-button");
menu.setAttribute("class", "toolbarbutton-1");
menu.setAttribute("type", "menu");
menu.setAttribute("tooltiptext", "");
menu.setAttribute("onclick","if (event.button === 1 && !this.open) {getBrowser (). selectedTab = getBrowser (). addTab ('about:config')};");
}
//ab hier ist alles gleich, egal ob Button oder Menue
var css = " \
#ExtraConfigMenu, #ExtraConfigMenu-button { \
list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACnElEQVR4Xm2RzYtbZRSHn/fr3pvJzTB3qiNM2k2pMBUGhEHaqsUqdeFGQalCobgREaFu/B/cqCtxVSjoQhBEQRBmIfWDKgNGJUPt0Nhah9JJ4iSd5E6+bu5972tAO4SS5/DjXZ1znsMrNiq1eikMQqYYJCmjxNH5+zdW777L0J5KKl9VPmnf+ut9KWkwhbheuzNcOVYOmGKc5iRO0r1ykeXCx0h7kt4fC3z5wfqbQnAJwQHa5S7jAZSRuJ0mkf81cheobhBXZa+ri1uptQjHAZoZCEC1PiPgDuwxCfwerBU7b73zXn//3usCcdt4HkZ7SGZg431U51NUCgwlO3cV/bVXhR/6p9ut+nP9QYeNn7/n8qUPZxvQ/Q6VVWHk4ZqWRvlJjpx9hcGfW2wO95N2q8m3618A2WwDt/0RplSAXsBed57eyossHl5GYdHacG3zGpADM06wjQ1UUIN+CLHPvfAxojPnKLiE+bDE1R9+5GatAmgPeGCAteQ7l5GBhGSyuROyd/gFouUyWkqEErR2mwXAAA8BRS0AgMQBjSra30ZkEeDzz9Dn4ZcvMO51SMcJcTdGChmA0ABA6cAgzyG3I8jLEBylV4fWoaeIc0V7t0Uv7pFbC+CA+28mp/8+SwXKnMVmz1O9HpE+eobMZdjcoY1GIHD/NwIdoH1fBaNguzlg88pVyoUi4vTbFI8eJxsNAIfSkrliESllH/L0v0jktNNomFGv1TFrL3Fo9QSMR3jaEEXzLC09gjaKp595No0WjyCEB4zRclICUMDxtRMce/wJ1MIi2SglXShhfI/cOjxPoZRmbq4gXzt/gVrtBrdvbiG+Wf+p/mvll1BpiVAGhCDPxuAUDotz4HKHlIJON6bRbL4hhPjcMx5mkn8BBLEUrsVZbq0AAAAASUVORK5CYII=) !important; \
} \
#ExtraConfigMenu-button > dropmarker, #ExtraConfigMenu-button > hbox > .toolbarbutton-menu-dropmarker { \
display: none !important; \
}";
var sss = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
var uri = makeURI('data:text/css;charset=UTF=8,' + encodeURIComponent(css));
sss.loadAndRegisterSheet(uri,sss.AGENT_SHEET);
menu.setAttribute("onpopupshowing","uProfMenu.getScripts(0)");
var menupopup = menu.appendChild(this.createME("menupopup",0,0,0,"ExtraConfigMenu-popup"));
// Anlegen von Untermenues fuer die userChromeJS-Skripte (befuellt werden sie spaeter)
var submenu=menupopup.appendChild(this.createME("menu","uc.js",0,0,"submenu-ucjs"));
var submenupopup = submenu.appendChild(this.createME("menupopup",0,0,0,"submenu-ucjs-items"));
var submenu=menupopup.appendChild(this.createME("menu","uc.xul",0,0,"submenu-ucxul"));
var submenupopup = submenu.appendChild(this.createME("menupopup",0,0,0,"submenu-ucxul-items"));
if (this.enableScriptsToClip) menupopup.appendChild(this.createME("menuitem","Skriptliste in Zwischenablage","uProfMenu.getScripts(1)","uProfMenu_clipboard",0));
// Ende Anlegen von Untermenues fuer die userChromeJS-Skripte
menupopup.appendChild(document.createElement('menuseparator'));
// Einbindung von Konfigdateien
menupopup.appendChild(this.createME("menuitem","userChrome.css","uProfMenu.edit(0,'userChrome.css');","uProfMenu_edit",0));
menupopup.appendChild(this.createME("menuitem","userContent.css","uProfMenu.edit(0,'userContent.css');","uProfMenu_edit",0));
menupopup.appendChild(this.createME("menuitem","userChrome.js","uProfMenu.edit(0,'userChrome.js');","uProfMenu_edit",0));
menupopup.appendChild(this.createME("menuitem","prefs.js","uProfMenu.edit(1,'prefs.js');","uProfMenu_edit",0));
menupopup.appendChild(this.createME("menuitem","user.js","uProfMenu.edit(1,'user.js');","uProfMenu_edit"),0);
// Ende Einbindung von Konfigdateien
menupopup.appendChild(document.createElement('menuseparator'));
// Einbindung von Ordnern
/*switch (this.gmOrdner) {
case 1:
menupopup.appendChild(this.createME("menuitem","GM Skripte","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfD')+uProfMenu.getDirSep()+'gm_scripts');","uProfMenu_folder"),0);
break;
case 2:
menupopup.appendChild(this.createME("menuitem","USL Skripte","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'UserScriptLoader');","uProfMenu_folder"),0);
break;
case 3:
menupopup.appendChild(this.createME("menuitem","Scriptish Skripte","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfD')+uProfMenu.getDirSep()+'scriptish_scripts');","uProfMenu_folder"),0);
break;
}*/
if (this.cssOrdner) {
menupopup.appendChild(this.createME("menuitem","CSS Ordner","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'CSS');","uProfMenu_folder"),0);
menupopup.appendChild(this.createME("menuitem","CSSWeb Ordner","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('UChrm')+uProfMenu.getDirSep()+'CSSWeb');","uProfMenu_folder"),0);
}
menupopup.appendChild(this.createME("menuitem","Chromeordner","uProfMenu.prefDirOpen('UChrm');","uProfMenu_folder"),0);
menupopup.appendChild(this.createME("menuitem","Profilordner","uProfMenu.prefDirOpen('ProfD');","uProfMenu_folder"),0);
menupopup.appendChild(this.createME("menuitem","Addonordner","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfD')+uProfMenu.getDirSep()+'extensions');","uProfMenu_folder"),0);
menupopup.appendChild(this.createME("menuitem","Installationsordner","uProfMenu.prefDirOpen('CurProcD');","uProfMenu_folder"),0);
menupopup.appendChild(this.createME("menuitem","Startup-Cacheordner","uProfMenu.dirOpen(uProfMenu.getPrefDirectoryPath('ProfLD')+uProfMenu.getDirSep()+'startupCache');","uProfMenu_folder"),0);
// Ende Einbindung von Ordnern
// Einbindung von abouts
if (this.abouts.length>0) {
menupopup.appendChild(document.createElement('menuseparator'));
// falls der erste Eintrag des arrays ='0' ist, dann kein Untermenue anlegen, sondern direkt als Menuepunkte einbinden
if (this.abouts[0]=='0') {
for (var i = 1; i < this.abouts.length; i++) {
menupopup.appendChild(this.createME("menuitem",this.abouts[i],"getBrowser (). selectedTab = getBrowser (). addTab ('"+this.abouts[i]+"')","uProfMenu_about"),0);
}
} else {
// der erste Eintrag des arrays ist ungleich '0', deshalb als Untermenue einrichten
var submenu=menupopup.appendChild(this.createME("menu","uc.js",0,0,"submenu-about"));
var submenupopup = submenu.appendChild(this.createME("menupopup",0,0,0,"submenu-about-items"));
this.fillMenu("submenu-about","submenu-about-items", "about:",this.abouts,"uProfMenu_about",1);
}
}
// Ende Einbindung von abouts
// Separator, falls dieser nicht schon durch abouts generiert wurde und weitere Menuepunkte folgen werden
if (this.abouts.length==0 && (this.showNormalPrefs || typeof(ToolRstartMod) != "undefined")) menupopup.appendChild(document.createElement('menuseparator'));
// Falls gewuenscht (s. Konfigurationsabschnitt), Zugriff auf die normalen Einstellungen
if (this.showNormalPrefs) menupopup.appendChild(this.createME("menuitem","Einstellungen","try{openOptionsDialog();}catch(e){openPreferences();}","uProfMenu_prefs"),0);
// Falls addRestartButton installiert ist, Neustart zur Verfuegung stellen (addRestartButton 1.0.20120105mod erforderlich)
if(typeof(ToolRstartMod) != "undefined" || this.enableRestart) menupopup.appendChild(this.createME("menuitem","Neustart",
"try{ToolRstartMod.SaveRestart(event,1);} catch(e){alert(e);}","uProfMenu_restart"),0);
},
getDirSep:function() {
// Betriebssystem nach https://developer.mozilla.org/en/Code_snippets/Miscellaneous ermitteln
var osString = Components.classes["@mozilla.org/xre/app-info;1"].getService(Components.interfaces.nsIXULRuntime).OS;
var dirsep="/";
switch(osString) {
case "WINNT":
dirsep="\\";
break;
case "Linux":
dirsep="/";
break;
case "Darwin":
dirsep="/";
break;
}
return dirsep;
},
edit:function(OpenMode,Filename){
var Path = "";
var dSep = this.getDirSep(); // die Trennzeichen zwischen Ordnern abhaengig vom Betriebssystem machen
switch (OpenMode){
//Current is Chrome Directory
case 0:
var Path = this.getPrefDirectoryPath("UChrm") + dSep + Filename;
break;
//Current is Profile Directory
case 1:
var Path = this.getPrefDirectoryPath("ProfD") + dSep + Filename;
break;
//Current is Root
case 2:
var Path = Filename;
break;
}
this.launch(this.TextOpenExe,Path);
},
dirOpen:function(Path){
if (this.vFileManager.length != 0) {
var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
var process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
var args=[Path];
file.initWithPath(this.vFileManager);
process.init(file);
// Verzeichnis mit anderem Dateimanager oeffnen
process.run(false, args, args.length);
} else {
// Verzeichnis mit Dateimanager des Systems oeffnen
var dir = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsIFile);
dir.initWithPath(Path);
dir.launch();
}
},
prefDirOpen:function(prefDir){
Path = this.getPrefDirectoryPath(prefDir);
this.dirOpen(Path);
},
getPrefDirectoryPath:function(str){
// get profile directory
var file = Components.classes["@mozilla.org/file/directory_service;1"]
.getService(Components.interfaces.nsIProperties)
.get(str, Components.interfaces.nsIFile);
if (str == 'CurProcD') {
file = file.parent;
};
return file.path;
},
launch:function(RanPath,OpenPath){
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsIFile);
var proc = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);
var args = [OpenPath];
file.initWithPath(RanPath);
// falls der im Konfigurationsabschnitt definierte Editor nicht gefunden wird, auf Einstellung in about:config ausweichen:
if (!file.exists()) {
var pref = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
RanPath=pref.getCharPref("view_source.editor.path");
file.initWithPath(RanPath);
}
proc.init(file);
proc.run(false, args, args.length);
},
stringComparison:function(a, b){
a = a.toLowerCase();
a = a.replace(/ä/g,"a");
a = a.replace(/ö/g,"o");
a = a.replace(/ü/g,"u");
a = a.replace(/ß/g,"s");
b = b.toLowerCase();
b = b.replace(/ä/g,"a");
b = b.replace(/ö/g,"o");
b = b.replace(/ü/g,"u");
b = b.replace(/ß/g,"s");
return(a==b)?0:(a>b)?1:-1;
},
getScripts:function(iType) {
// Arrays (jeweils ein Array fuer uc.js und uc.xul) nehmen Namen der gefundenen Skripte auf
let ucJsScripts = [];
let ucXulScripts = [];
// Suchmuster, also die Dateierweiterungen uc.js und uc.xul
let extjs = /\.uc\.js$/i;
let extxul= /\.uc\.xul$/i;
let aFolder = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
aFolder.initWithPath(Services.dirsvc.get("UChrm", Ci.nsIFile).path);
// files mit Eintraegen im Chrome-Ordner befuellen
let files = aFolder.directoryEntries.QueryInterface(Ci.nsISimpleEnumerator);
// Ordner bzw. files durchlaufen und kontrollieren, ob gesuchte Dateien dabei sind
while (files.hasMoreElements()) {
let file = files.getNext().QueryInterface(Ci.nsIFile);
// keine gewuenschte Datei, deshalb continue
if (!extjs.test(file.leafName) && !extxul.test(file.leafName)) continue;
// uc.js gefunden -> im Array ablegen
if (extjs.test(file.leafName)) ucJsScripts.push(file.leafName);
// uc.xul gefunden -> im Array ablegen
if (extxul.test(file.leafName)) ucXulScripts.push(file.leafName);
}
if (this.sortScripts) {
ucJsScripts.sort(this.stringComparison);
ucXulScripts.sort(this.stringComparison);
}
// Aufruf der naechsten Methoden um die beiden Untermenues oder die Zwischenablage zu befuellen
if (iType==0) {
this.fillMenu("submenu-ucjs","submenu-ucjs-items", "uc.js",ucJsScripts,"uProfMenu_ucjs",0);
this.fillMenu("submenu-ucxul","submenu-ucxul-items", "uc.xul",ucXulScripts,"uProfMenu_ucxul",0);
} else {
var result=this.fillClipboardValue(ucJsScripts,ucXulScripts);
Components.classes["@mozilla.org/widget/clipboardhelper;1"].getService(Components.interfaces.nsIClipboardHelper).copyString(result);
}
},
fillMenu:function(whichsubmenu, whichsubmenuitems, strlabel, scriptArray,sClass,sTyp) {
// Beschriftung des Untermenues mit Anzahl der gefundenen Dateien ergaenzen
var e = document.getElementById(whichsubmenu);
e.setAttribute('label',strlabel + ' (' + scriptArray.length + ')');
var popup = document.getElementById(whichsubmenuitems);
// zunaechst Untermenue zuruecksetzen
while(popup.hasChildNodes()){
popup.removeChild(popup.firstChild);
}
// Untermenue endlich befuellen
for (var i = scriptArray.length-1; i > -1; i--) {
// bisher nur eine Typunterscheidung (userChromeJS-Skript oder about:)
if (sTyp==0){
var mitem = this.createME("menuitem",scriptArray[i],"uProfMenu.edit(0,'"+scriptArray[i]+"')",sClass,0);
mitem.setAttribute("onclick","uProfMenu.openAtGithub(event,'"+scriptArray[i]+"')");
mitem.setAttribute("tooltiptext"," Linksklick: Bearbeiten,\n Mittelklick: https://github.com/.../"+this.cleanFileName(scriptArray[i])+" \u00F6ffnen,\n Rechtsklick: Suche auf GitHub");
} else {
var mitem = this.createME("menuitem",scriptArray[i],"getBrowser (). selectedTab = getBrowser (). addTab ('"+scriptArray[i]+"')",sClass,0);
}
popup.insertBefore(mitem, popup.firstChild);
}
},
fillClipboardValue:function(sArray,xArray) {
var retValue;
var s = 0;
var x = 0;
s = sArray.length;
x = xArray.length;
switch(this.enableScriptsToClip) {
case 1:
retValue = "userChromeJS/uc.js ("+s+"):\n------------------------\n"+sArray.join("\n")+
"\n\nuserChromeJS/uc.xul ("+x+"):\n-------------------------\n"+xArray.join("\n");
break;
default:
retValue = "userChromeJS/uc.js ("+s+"):\n------------------------";
for (var i = 0; i < s ; i++) {
j = i + 1;
retValue = retValue + "\n" + j + ". " + sArray[i];
}
retValue = retValue + "\n\nuserChromeJS/uc.xul ("+x+"):\n-------------------------";
if (this.enableScriptsToClip==2) s = 0;
for (var i = 0; i < x ; i++) {
j = i + s + 1;
retValue = retValue + "\n" + j + ". " + xArray[i];
}
break;
}
return retValue;
},
createME:function(sTyp,sLabel,sCommand,sClass,sId) {
// Anlegen von menuitem, menu oder menupop - fuer bestimmte Typen nicht eingesetzte Parameter werden als 0 uebergeben
const XUL_NS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
var m = document.createElementNS(XUL_NS, sTyp);
switch (sTyp) {
case "menuitem":
// this.createME("menuitem","Label des Items","ZuzuweisenderCodeFueroncommand","GewuenschteKlasseDesItems",0)
m.setAttribute('label', sLabel);
m.setAttribute('oncommand',sCommand);
m.setAttribute('class',sClass);
break;
case "menu":
// this.createME("menu","Label des Menues",0,0,"GewuenschteIdDesMenues")
m.setAttribute('label', sLabel);
m.setAttribute('id', sId);
break;
case "menupopup":
//this.createME("menupopup",0,0,0,"GewuenschteIdDesMenupopups");
m.setAttribute('id', sId);
break;
}
return m;
},
openAtGithub:function(e,sScript) {
if (e.button==1){
// Mittelklick - Seite auf GitHub oeffnen (funktionier nur, wenn Ordner- und bereinigter Dateiname [ohne Erweiterung] uebereinstimmen):
var sUrl="https://github.com/ardiman/userChrome.js/tree/master/"+this.cleanFileName(sScript);
getBrowser (). selectedTab = getBrowser (). addTab (sUrl);
}
if (e.button==2){
// Rechtsklick - Suche auf GitHub starten (funktioniert nur, wenn der Dateiname im Code hinterlegt ist):
e.preventDefault();
var sUrl="https://github.com/search?type=Everything&language=&q="+sScript+"&repo=&langOverride=&start_value=1";
getBrowser (). selectedTab = getBrowser (). addTab (sUrl);
}
},
cleanFileName:function(sName) {
sName=sName.toLowerCase();
/* Das folgende Array enthaelt regulaere Ausdruecke, um ungueltige Zeichenfolgen entfernen:
/Datei-Erweiterungen am Ende/, /"ucjs_" am Anfang/, /"_"gefolgtVonZahlUndDanachBeliebigenZeichen/
/ "_fx"gefolgtVonZahl(en)/, /"-" oder "+" oder "."/, /"_v"gefolgtVonZahlen
*/
var regs=[/\.uc\.js$/,/\.uc\.xul$/,/^ucjs_/,/_\d.+/,/_fx\d+/,/[-+\.]/g,/_v\d+/];
for (var i = 0; i < regs.length; i++) {
sName=sName.replace(regs[i],"");
}
return sName;
}
};
uProfMenu.init();
Alles anzeigen
Es geht erstmal nur darum ob dir dann 13 Einträge angezeigt werden.
Wenn ja teste ob alle anderen Funktionen auch ok sind.
Edit:
Das obige Script nutze ich unter Fx 57 - Fx 58, es wurde mal dafür angepasst.
Könnte also sein dass es bei dir gar nicht funktioniert fällt mir eben ein.
Der Start wurde oben in die Menüleiste plaziert.
Nach Aufruf wurden alle 13 Einträge angezeigt - auch die hübschen Icons davor.
Allerdings funktionieren nun meine Verschönerungen, z.B. about:about - about:profiles - about:support nicht mehr im richtigen Kleid (hatte die Endor-Variationen verwendet als *.css).
Da muss noch nachgebessert werden. Den Start muss ich mir auch noch in die urlbar-container plazieren.
Außerdem muss mein geliebter TotalCommander wieder eingebunden werden.
Habe eben mal die urlbar eingebaut - da möchte das Icon sich aber nicht niederlassen!
noch in die urlbar-container plazieren.
Dazu diesen Eintrag austauschen:
warpmenuto: 'helpMenu',
gegen:
warpmenuto: 'urlbar-container',
funktionieren nun meine Verschönerungen..
Darauf dürfte das Script eigentlich keinen Einfluß haben :-??
mein geliebter TotalCommander wieder eingebunden werden.
Müsste ca. Zeile 15 sein:
vFileManager: 'C:\\TotalCmd\\Totalcmd64.exe',
da möchte das Icon sich aber nicht niederlassen!
Scriptcache mal geleert?
PS:
Bitte nicht nachträglich deine Antworten editieren, ich lese immer nur die aktuell letzte, danke :wink:
andreas >> es ist vollbracht.
Hatte vorher ja meine Version umbenannt *.txt - dafür deine Version ausprobiert, mit meinen obigen Hinweisen.
Dann meine Idee: deine Version wieder umbenannt - meine alte Version (mit 12 Einträgen) wieder aktiviert als uc.js .
Du wirst es nicht glauben wollen >> alles ist wieder wie gewünscht vorhanden - 13 Einträge - nur die Verschönerungen fehlen.
Da muss ich weitersuchen - aber mache vorerst Schluss >> mir raucht ein wenig der Kopf!!
Trotzdem vielen Dank für deine Geduld mit mir!!
War wie immer gern geschehen
Mein RamBack.uc.xul - Script hinterlässt im Nightly mal wieder keinen Button in der New Toolbar...
Hatte das neulich schon mal.. mit Andis Hilfe war das aber geklärt... nun wieder kein Button zu sehen..
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="data:text/css,
@namespace%20url('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul');
@namespace%20html%20url('http://www.w3.org/1999/xhtml');
%23ramback-toolbar-button {
list-style-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAABGdBTUEAAK%2FINwWK6QAAABl0RVh0U29mdHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAAOcSURBVHjaYvz%2F%2Fz8DJQAggBgU5OUZeHl5GSQlJRnY2dkZ%2BPj4GLi5uRn4%2Bfmzvb29X6qpqW1lZGQUAqllZWVlkJGRAdNiYmIMnJycDAABxIJsGMg1nz9%2F5tHS0loSHBzsq6Ojw%2FTmzRuvNWvWXN6%2Ff3%2FCnz9%2FdgMNQ3EAQAAxCwgIMHz%2F%2Fp2BmZmZ4ffv3852dna7gJrNgbYw3rx5k%2BHXr18MBgYGvEAXhj948EAYaMnOHz9%2BgG0HyQEEEDPQqQxfvn4FObkrICBgMtBWocePHzO8evWK4e%2FfvwwfPnxg%2BPbtG4O8vDyzhoaGBdBFgc%2BePdsHNOAt0EIGgABi5uTg0JCTl9%2Fq7Owc9vPnT%2Bbr169DTAa6CBQmoPAAOp3h3r17DO%2Ffv2cAWiDBw80d%2F%2Fbt28%2Ffv307CxBAzH4hYddMLazUjh4%2ByHD%2F%2Fn0GHh4ekGsYhISEGFhYWMAuePHiBZh%2B8uQJw727dxlMLK3YhcUkPW%2FdvM4AEEAsfrYWwiqi4gxf3r9jOHHiKDiEQZqBrgF7A6QR5ILv374DDWRlUNHUZGACikn%2B%2FcYIdIknQAAxRwk8yjGy%2Fc8tKWzJICSvw%2FD0%2BWOGZ0%2BfMjx6%2BBCsGRTAX798YRAUFmJQ09Jn4P7BwBDpzMxgIPaMYf32u%2BcAAojp1VeBS9y8fxi%2BbalmMGe7x%2BDvHcAgoaDK8AUYcK9evgQbIK%2BmyaCsZsigzPKWwfrPQQZ1yc8M39ll%2F3358fcIQACx2Mvxqfx49wKYMHgZpE2%2FMDxdsJbBkFOBgc%2FJjeHa1QsMAiJiDPw%2F%2FzJwnd%2FHENlixsDz1oTh%2FY1bDBJSRoxiHMycAAEAQQC%2B%2FwTW2dP95K%2F9AOryJf4T5eoCEvDJADFYEwC7xgkA9h8mAAHs6QBhUxIABd4CAPba0gDsACv%2F3sfq%2FxccxwL9%2Fv4fAgBBAL7%2FAq7H50BmkuSYHxL9%2FQP25QDm9xv%2BGh0JAPDZwQDh5esA8ebcACEY8QD4Cib%2B7ejtACwd9AGktu%2FXT5DXid36%2B4oCiCFOiINBBJgkPYSY6lOlGF4vibL99f9s9P9gdc43QlIKx9V4uK%2FfmG%2F2%2F9Lc6H85EsyvIxRZnrMzMiTCkjJAAIENkAYyOCBc%2BXYbqQuny5X%2F6wswHgcJiDEwqK6LEf%2ByIVXlvzAD0wSIEAIABBDYACkgQxiIuYFYgoFBGpj12pgYGLxB8iDXKTIwBPEyMLQAmeKMaLkZIMAAUM1Z7n%2BaufcAAAAASUVORK5CYII%3D);
}
" type="text/css"?>
<overlay id="ramback-overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"><![CDATA[
var ramback = {
onMenuItemCommand: function(e) {
var observerService = Components.classes["@mozilla.org/observer-service;1"].getService(Components.interfaces.nsIObserverService);
// since we don't know the order of how things are going to go, fire these multiple times
observerService.notifyObservers(null, "memory-pressure", "heap-minimize");
observerService.notifyObservers(null, "memory-pressure", "heap-minimize");
observerService.notifyObservers(null, "memory-pressure", "heap-minimize");
observerService.notifyObservers(null, "dump-mem-stats", "clean up, pig!");
},
onToolbarButtonCommand: function(e) {
// just reuse the function above. you can change this, obviously!
ramback.onMenuItemCommand(e);
}
};
]]></script>
<menupopup id="menu_ToolsPopup">
<menuitem id="ramback-hello" label="Internen Speicher leeren" insertafter="sanitizeItem"
oncommand="ramback.onMenuItemCommand(event);"/>
</menupopup>
<toolbar id="new-toolbar">
<toolbarbutton id="ramback-toolbar-button"
label="Clear Caches"
tooltiptext="Internen Speicher leeren"
oncommand="ramback.onToolbarButtonCommand()"
class="toolbarbutton-1"/>
</toolbar>
</overlay>
Alles anzeigen
Gleiches gilt für Show Passwort.uc.xul
<?xml version="1.0"?>
<overlay id="showpassword"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript"><![CDATA[
var showpasswordpratikpoddar = {
showpassword: function() {
var showMe = document.getElementById("showpassword-hide").style;
var hideMe = document.getElementById("showpassword-show").style;
var currenttabIndex = gBrowser.tabContainer.getIndexOfItem(gBrowser.selectedTab);
var currentBrowser = gBrowser.getBrowserAtIndex(currenttabIndex);
var inputElementList = currentBrowser.contentDocument.getElementsByTagName("input");
var inputElementsLength = inputElementList.length;
// Loop through all the input tags
for(var j = 0; j < inputElementsLength; j++) {
inputElement = inputElementList[j];
// If the element is password
if(inputElement.hasAttribute("type") && inputElement.getAttribute("type").toLowerCase() == "password") {
var temp = inputElement.value;
inputElement.type = "text";
inputElement.value = temp;
inputElement.setAttribute("typechanged", 1);
}
}
showMe.display="";
hideMe.display="none";
return;
},
hidepassword : function() {
var showMe = document.getElementById("showpassword-show").style;
var hideMe = document.getElementById("showpassword-hide").style;
var currenttabIndex = gBrowser.tabContainer.getIndexOfItem(gBrowser.selectedTab);
var currentBrowser = gBrowser.getBrowserAtIndex(currenttabIndex);
var inputElementList = currentBrowser.contentDocument.getElementsByTagName("input");
var inputElementsLength = inputElementList.length;
// Loop through all the input tags
for(var j = 0; j < inputElementsLength; j++) {
inputElement = inputElementList[j];
// If the element is password
if(inputElement.hasAttribute("typechanged") && inputElement.getAttribute("typechanged") == 1) {
var temp = inputElement.value;
inputElement.type = "password";
inputElement.value = temp;
inputElement.removeAttribute("typechanged");
}
}
showMe.display="";
hideMe.display="none";
return;
}
}
]]></script>
<statusbar id="new-toolbar">
<statusbarpanel id="showpassword-show" class="statusbarpanel-iconic" tooltiptext="Passwort im Klartext anzeigen" onclick="showpasswordpratikpoddar.showpassword();" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8%2F9hAAAACXBIWXMAAA7EAAAOxAGVKw4bAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89%2BbN%2FrXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz%2FSMBAPh%2BPDwrIsAHvgABeNMLCADATZvAMByH%2Fw%2FqQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf%2BbTAICd%2BJl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA%2Fg88wAAKCRFRHgg%2FP9eM4Ors7ONo62Dl8t6r8G%2FyJiYuP%2B5c%2BrcEAAAOF0ftH%2BLC%2BzGoA7BoBt%2FqIl7gRoXgugdfeLZrIPQLUAoOnaV%2FNw%2BH48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl%2FAV%2F1s%2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VHjadJO%2Fa11lGMc%2F7zlvjjcht%2BeeYhIbtKAgbYdChEo7CIXaqeIiODm5CMGh0KFT%2Bwfo0LmdXRzq1iEgaKdSDRRbl%2FSGGlBvMPf8SDgn9z3nvD8d0gpC%2BsAzPMP3%2B3yG71c8AgK8N7e4%2BHly6tQqQkAIgeNGCEEI6MnkT6PU9wIm0sH7w7W1u6vXr19JTp8G7%2BE1eoSAKKJ%2F8YLdO3cuH25tfS1lmn6xsr5%2BZXTtGnZ%2Fn2At3tr%2F66KIOEl4Zbtw%2FjymaT5Vt279JMmyZbGwgBqPcXWNGA6Racr8%2FDxEEVopmqIgNA2DJMELQVwURCdOINL0rcgaY%2FrpFL23h9rdRY5GyLNn2awqftzZ4Z%2FRiPTSJSbW8vd4jC0K9HRKn%2BcY7600ztEXBWIwoK8qlkLgl6dP%2BebGDd4Ugg8uXuTL27eZSMn02TM%2BPnOGZDikL0ustUhjLV1REOKYfn8foxS994yU4pOlJZYPDkjalr%2BKgu3xmAuLiwyzjK4sMc4htTGossSGQF9V1HnOh1evMnfzJu86x9tra%2BxozcONDd45PKQvS%2BKuoy1LtHNI4xxtUWC1pqsq7GxGLASzLONXrdl48oSfHzxAbW5ybmUFW5Y0dU1fVS8JnENVFXHX0VUVEvhta4tv19dZns0YSEkWAh%2BlKavWMstzQhxjmwbtPVJbizo4IFaKtiwJ1uKArG25bAzLgwFRFCGNQVcVfQiIOMZ13RGB9Z62rhFRhKlr8jzn9%2B1trDHM9T1CCDTQh%2FBfkBCCYC3GeyGNc3N2NgMgCoFH9%2B7xGDjZNGhrqbXGHx9svPexNLCHc0fGQPv8OeeAN17evXO8phkImEQevvOw4QALJEAGLBy1FAu4Y9bDfQc%2FSOCPAF95%2BAxYERBeIYdjnwIwieA%2BsPfvAPYIhnr6i%2FXWAAAAAElFTkSuQmCC"/>
<statusbarpanel id="showpassword-hide" class="statusbarpanel-iconic" style="display:none;" tooltiptext="Passwort verbergen" onclick="showpasswordpratikpoddar.hidepassword();" src="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PVy3q2z7EQ%2FQYa%2Fp0mq2SCShshX5dsZYxszPz0EUiiSjLXvpSfdA4tS5YX2bodvklt2gaxZYlMcY%2FliwdvFPOhsLnGyfov5bWdtYpfAZQ3eb3A3xGtR49RQuoylNyrqAXmTlhxXe%2FugtzEB4YulJ3nv1A%2BSGYWXrMseeeZROo0NZ53ivGFWlsBlpTCnrkspXOBuw%2Byv6L%2Fap%2BltMm1OGNzNWb6yycLrNtNOjqHO8eow6R25zQoiUtiAbD3nq8bO803oXWfScOLjE7HrN199dZLK4TVHn2OmMwuaoeoyqp7AZTmvKuqDSCcmc0B31qL%2Bv%2Bam4xIVvL%2FCr%2B5kjxweUMWdcjSjrguA8Rp2nmBVM0xlbtkDm4LdfrvHGuWXsoQmmZeBwZN%2BJLvGoks2GJDFlomO8Cxivyp3ZFlVSUdocjYoo1P0pyXOO9qBJIgmh4ShDQZxEEkmxYYb3HuNdYBxHJJIw1hFZNsRfXsOpg3lLlQrRQdT4n0iCoChBg5jgfWMSJgCEJPLZpU%2Bpr8D0wJhEFZ3URH%2BX03FH0xBCaqJnU3cTInA1%2Fk44Da05iCk467nPNBBh3eD5XOAU8CzsFGnuJjyI536cB76ShS%2BByBEiLwEDICL%2Fe%2FXuQe6wjnAeYfPfAQD6z4IW9epAmAAAAABJRU5ErkJggg%3D%3D"/>
</statusbar>
</overlay>
Alles anzeigen
Wo liegt der Fehler? Liegts ggf. daran, das es ....uc.xul-Scripte sind?
Mit RamBack.uc.xul kann ich bestätigen, Lösung weiß ich leider keine.
Show Passwort.uc.xul funktioniert eh nicht mehr ab Fx 57.
Ich nutze dafür jetzt ein Script für Tampermonkey.
// ==UserScript==
// @name Show My Passwords
// @namespace ShowMyPasswords
// @version 1.2
// @description Show/Hide the contents of password fields by clicking on the eye icon or with hotkey
// @author Elwyn
// @license MIT License
// @name:es Ver Mis Contraseñas
// @description:es Muestra/Ocultar el contenido de los campos de contraseña haciendo clic en el icono o con conbinacion de teclas
// @include http://*
// @include https://*
// @grant GM_info
// @grant GM_deleteValue
// @grant GM_listValues
// @grant GM_setValue
// @grant GM_getValue
// @grant GM_getResourceText
// @grant GM_getResourceURL
// @grant GM_addStyle
// @grant GM_log
// @grant GM_openInTab
// @grant GM_registerMenuCommand
// @grant GM_setClipboard
// @grant unsafeWindow
// @run-at document-end
// @encoding utf-8
// ==/UserScript==
// Note: We use Pure Javascript to prevent potential conflicts on some websites
// *******************************************************************************
(function() {
'use strict';
// USER SETTINGS
//-----------------------------------------------------------------------------
// Character Key to Show/Hide passwords in combination with ( Ctrl + Alt + ) on Fields
var charKeyForField = 'S';
// Character Key to Show/Hide Eye Icon in combination with ( Ctrl + Alt + )
var charKeyForIcon = 'P';
// Show/Hide passwords with HotKey on password fields ( Ctrl + Alt + S )
var showWithHotKey = true;
// Show Eye Icons on Init ( Ctrl + Alt + P = Show/Hide the Eye Icons )
var showEyeIcon = true;
//-----------------------------------------------------------------------------
// END OF USER SETTINGS
try{
showEyeIcon = GM_getValue('showEyeIcon', showEyeIcon);
}catch(e){}
var ctrlKey = false;
var fieldKeyCode = (charKeyForField.toLowerCase()).charCodeAt(0) - 32;
var iconKeyCode = (charKeyForIcon.toLowerCase()).charCodeAt(0) - 32;
// Function Helpers
function getStyle(el, styleProp)
{
var val;
if (el.currentStyle)
val = el.currentStyle[styleProp];
else if (window.getComputedStyle)
val = document.defaultView.getComputedStyle(el,null).getPropertyValue(styleProp);
return val;
}
var onEyeClick = function() {
var fields = document.querySelectorAll( 'input[aria-eye="true"]' );
for (var i = 0; i < fields.length; i++)
{
if( fields[i].type == 'password' )
{
fields[i].setAttribute( 'type', 'text' );
fields[i].className += ' show-pass-warning';
} else {
fields[i].setAttribute( 'type', 'password' );
fields[i].className = fields[i].className.replace(/\s*show-pass-warning/,'');
}
}
};
// Main Function
var addEyeIcon = function(){
var password_fields = document.querySelectorAll('input[type="password"]');
if ( password_fields.length )
{
for (var i = 0; i < password_fields.length; i++)
{
var current_field = password_fields[i];
// Check the initialization flag to prevent multiple initializations of the same field
if ( current_field.getAttribute('aria-eye') == 'true' ) continue;
// get the field style properties
var field_height = parseInt( getStyle( current_field, 'height' ) );
if ( field_height < 20 ) { field_height = 20; }
var field_margin_top = parseInt( getStyle( current_field, 'margin-top' ) );
var field_padding_left = parseInt( getStyle( current_field, 'padding-left' ) );
var field_padding_right = parseInt( getStyle( current_field, 'padding-right' ) );
// we use a container for the icon element for right position on the screen
var icon_container = document.createElement( 'div' );
var container_size = parseInt(getStyle( current_field, 'width'));
icon_container.setAttribute('style','position:absolute; width:' + container_size + 'px;');
var icon_button = document.createElement( 'span' );
icon_button.className = 'eye-pass-icon';
icon_button.setAttribute('aria-eye','true');
icon_button.setAttribute('style','height:' + field_height + 'px!important; margin-top:' + field_margin_top + 'px !important; margin-right:' + ( field_padding_right ) + 'px !important;');
icon_button.setAttribute('title','( Ctrl + Alt + ' + (charKeyForIcon.charAt(0)).toUpperCase() + ' ) or ( Ctrl + Click ) to Show/Hide Eye Icon');
if ( showEyeIcon === false )
{
icon_button.setAttribute( 'aria-eye', 'false' );
icon_button.className += ' hide-eye-icon';
}
// add a click event in every eye icon and YES, we show and hide the fields with any icon
icon_button.addEventListener( 'click', function(){
if ( ctrlKey )
{
changeIconState();
return;
}
onEyeClick();
}, false);
// We generate a flag in the field to prevent multiple initiations
current_field.setAttribute('aria-eye','true');
//We add the icon before the field for a correct positioning in the screen
icon_container.appendChild( icon_button );
current_field.parentNode.insertBefore( icon_container, current_field );
if ( showWithHotKey ) {
current_field.addEventListener( 'keydown', function(e){
// Ensure event is not null
e = e || window.event;
if ( e.ctrlKey && e.altKey && (e.which == fieldKeyCode || e.keyCode == fieldKeyCode)) {
onEyeClick();
}
}, false);
icon_button.setAttribute('title', icon_button.getAttribute('title') + '\n( Ctrl + Alt + ' + (charKeyForField.charAt(0)).toUpperCase() + ' ) Show/Hide Password on Focused Field');
}
}
}
};
var changeIconState = function()
{
var icons = document.querySelectorAll( '.eye-pass-icon' );
for (var i = 0; i < icons.length; i++)
{
if( icons[i].getAttribute('aria-eye') == 'true' )
{
icons[i].setAttribute( 'aria-eye', 'false' );
icons[i].className = 'eye-pass-icon hide-eye-icon';
try{
GM_setValue('showEyeIcon', false);
}catch(e){}
} else {
icons[i].setAttribute( 'aria-eye', 'true' );
icons[i].className = 'eye-pass-icon';
try{
GM_setValue('showEyeIcon', true);
}catch(e){}
}
}
};
// CSS Styles
var css = [
'.eye-pass-icon {',
'position:absolute;',
'display:block;',
'top: 0;',
'right: 0;',
'margin:0 2px;',
'border:0;',
'padding: 1px 2px;',
'width: 24px;',
'height: 20px;',
'line-height: 20px;',
'text-align:center;',
'background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAACjlBMVEVsbGxtbW0mJiYkJCQmJibU1NTh4eEiIiI5OTkWFhZ7e3sYGBjBwcF/f38hISEzMzNMTExwcHAdHR0ICAgmJiZWVlYtLS0hISEkJCQmJiYiIiIPDw8oKCgdHR0LCwsREREVFRUYGBgTExMuLi4oKCgLCwsODg7ExMQtLS0dHR0fHx+2trYrKytvb28+Pj4WFhYVFRUUFBTGxsaqqqoZGRlKSkqEhIRFRUUVFRXNzc00NDQzMzN6enrExMQwMDCzs7MoKCgbGxtYWFivr69DQ0NUVFSrq6sbGxuGhoaNjY06OjoZGRmHh4caGhqzs7NAQEB/f39NTU1BQUG+vr4cHBwdHR2FhYUjIyMkJCQmJiYHBwcHBwcHBwcGBgb///8JCQkwMDAyMjIyMjILCwsMDAwXFxcQEBAuLi4yMjIwMDAwMDD6+votLS0pKSnOzs7///9qamr////////////w8PD29vby8vL///////////////////8AAADl5eWXl5eOjo5JSUlLS0umpqbk5OTKysqampqcnJy7u7ulpaV4eHiYmJiFhYXDw8PFxcWTk5O8vLzU1NSJiYlkZGRSUlKpqam3t7eNjY3g4OCBgYHQ0NCqqqpGRkY7Ozs8PDxDQ0N3d3c/Pz9hYWFCQkIuLi5ycnKWlpZ7e3tTU1OioqJFRUXx8fFzc3NH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sgX7daSUf9MrXn5j5oWAJGSQmGZlWIzum4BpteM7Ux4UGODvHxAY1CgmjptIa2q1L60pavTibq6F97SRGY7n/fYgLxfpDSAvyCvvi7+6KX78iF0uL8grikMFha7PhKuw4AnSqA3/2u5VfLwGEZp4XtUG/lDaCx78AU3oAkjRRCc1AAAAAElFTkSuQmCC);',
'background-position: center center;',
'background-repeat: no-repeat;',
'background-size: 18px 18px;',
'cursor: pointer;',
'z-index: 100;',
'opacity: 0.7;',
'}',
'.eye-pass-icon:hover {',
'background-size: 20px 20px;',
'opacity: 1;',
'}',
'.hide-eye-icon {',
'display:none;',
'}',
'.show-pass-warning {',
'border: 1px solid rgba(236, 81, 81, 0.7) !important;',
'box-shadow: 0 0 5px rgba(236, 81, 81, 1) !important;',
'}'
];
var style_obj = document.createElement('style');
style_obj.innerText = css.join('');
document.documentElement.appendChild(style_obj);
// First Run
setTimeout(addEyeIcon, 1000);
// insertion-query v1.0.3 (2016-01-20)
// license:MIT
// Zbyszek Tenerowicz <naugtur@gmail.com> (http://naugtur.pl/)
var insertionQ=function(){"use strict";function a(a,b){var d,e="insQ_"+g++,f=function(a){(a.animationName===e||a[i]===e)&&(c(a.target)||b(a.target))};d=document.createElement("style"),d.innerHTML="@"+j+"keyframes "+e+" { from { outline: 1px solid transparent } to { outline: 0px solid transparent } }\n"+a+" { animation-duration: 0.001s; animation-name: "+e+"; "+j+"animation-duration: 0.001s; "+j+"animation-name: "+e+"; } ",document.head.appendChild(d);var h=setTimeout(function(){document.addEventListener("animationstart",f,!1),document.addEventListener("MSAnimationStart",f,!1),document.addEventListener("webkitAnimationStart",f,!1)},n.timeout);return{destroy:function(){clearTimeout(h),d&&(document.head.removeChild(d),d=null),document.removeEventListener("animationstart",f),document.removeEventListener("MSAnimationStart",f),document.removeEventListener("webkitAnimationStart",f)}}}function b(a){a.QinsQ=!0}function c(a){return n.strictlyNew&&a.QinsQ===!0}function d(a){return c(a.parentNode)?a:d(a.parentNode)}function e(a){for(b(a),a=a.firstChild;a;a=a.nextSibling)void 0!==a&&1===a.nodeType&&e(a)}function f(f,g){var h=[],i=function(){var a;return function(){clearTimeout(a),a=setTimeout(function(){h.forEach(e),g(h),h=[]},10)}}();return a(f,function(a){if(!c(a)){b(a);var e=d(a);h.indexOf(e)<0&&h.push(e),i()}})}var g=100,h=!1,i="animationName",j="",k="Webkit Moz O ms Khtml".split(" "),l="",m=document.createElement("div"),n={strictlyNew:!0,timeout:20};if(m.style.animationName&&(h=!0),h===!1)for(var o=0;o<k.length;o++)if(void 0!==m.style[k[o]+"AnimationName"]){l=k[o],i=l+"AnimationName",j="-"+l.toLowerCase()+"-",h=!0;break}var p=function(b){return h&&b.match(/[^{}]/)?(n.strictlyNew&&e(document.body),{every:function(c){return a(b,c)},summary:function(a){return f(b,a)}}):!1};return p.config=function(a){for(var b in a)a.hasOwnProperty(b)&&(n[b]=a[b])},p}();"undefined"!=typeof module&&"undefined"!=typeof module.exports&&(module.exports=insertionQ);
// Alternative Run to contemplate possible future DOM insertion of password fields through events
insertionQ('input[type="password"]').every(addEyeIcon);
// Key Event to Show/Hide Eye Icons on Ctrl + Alt + P
document.body.addEventListener( 'keydown', function(e){
// Ensure event is not null
e = e || window.event;
if ( e.ctrlKey && e.altKey && (e.which == iconKeyCode || e.keyCode == iconKeyCode)) {
changeIconState();
}
if ( e.ctrlKey ){
ctrlKey = true;
}
});
document.body.addEventListener( 'keyup', function(e){
ctrlKey = false;
});
})();
Alles anzeigen
OK, dann kann ich die Scripte löschen....
Danke....
Habe den Code mal mit Violentmonkey geladen, sehe aber keinen Button in der New-Toolbar...
sehe aber keinen Button in der New-Toolbar.
Den gibt es dafür auch nicht. :wink:
Öffne eine beliebige Webseite wo du dein Passwort eingeben musst, dann sollte sich im Passwortfeld ein "Auge" befinden.
Das angeklickt zeigt dir dann dein Passwort an.
[attachment=0]Zwischenablage01.jpg[/attachment]
Das klappt prima... super.... Thema erledigt...
Nächste Frage:
Das nachfolgende Script fügte Kopiertes in die Zwischenablage und in die Search-Bar ein...
https://github.com/ardiman/userCh…copyinsearchbar
Leider funktioniert das nicht in Nightly... Script tot oder Fehler hier?
(function() {
var lastSelection = "";
var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
if(!prefs.getPrefType("userChrome.autocopy.autocopyState")) prefs.setIntPref("userChrome.autocopy.autocopyState", 2);
function autocopyStart(e) {
lastSelection = getBrowserSelection();
}
function autocopyStop(e) {
var prefs = Cc["@mozilla.org/preferences-service;1"].getService(Ci.nsIPrefBranch);
var autocopyState = prefs.getIntPref("userChrome.autocopy.autocopyState");
var selection = getBrowserSelection();
if(autocopyState>0 && selection && selection!=lastSelection) {
goDoCommand('cmd_copy');
if(autocopyState>1) {
var searchbar = document.getElementById('searchbar');
searchbar.removeAttribute("empty");
searchbar.value = selection;
var evt = document.createEvent("Events");
evt.initEvent("oninput", true, true);
searchbar.dispatchEvent(evt);
}
}
}
gBrowser.mPanelContainer.addEventListener("mousedown", autocopyStart, false);
gBrowser.mPanelContainer.addEventListener("mouseup", autocopyStop, false);
})();
Alles anzeigen
Script tot
Keine Funktion mehr in Fx 57 und 58.
Ob es angepasst werden kann weiß ich leider nicht.
Brauch man das Script noch ?
Es gibt doch die Möglichkeit einen Text mit der Maus zu markieren und dann mit der rechte Maustaste darauf zu klicken und kann dann mit seiner Standartsuchmaschine direkt nach dem Begriff suchen.
[attachment=0]Zwischenablage02.jpg[/attachment]
Gruß EDV Oldi
Ich ackere jetzt mal alle durch...
Auto PopUp geht auch nicht....
ebenfalls tot?
https://github.com/ardiman/userCh…aster/autopopup
// ==UserScript==
// @name AutoPopup.uc.js
// @description Auto popup menulist/menupopup
// @compatibility Firefox 30.0+
// @author GOLF-AT, modify by gsf & aborix
// @version 2017.3.09
// ==UserScript==
(function() {
const showDelay = 200;
const hideDelay = 500;
var overElt = null;
var PopElt = null;
var PopTimer = null;
var HideTimer = null;
var AlwaysPop = false;
var searchBar = null;
if (window.BrowserSearch)
searchBar = BrowserSearch.searchBar;
// by gsf, 支持Fx的CSS所有语法: #表示id,. 表示class,或[id='demo']
// Fx support all of CSS syntax: # indicates id, . represents class, or [id='demo']
var BlackIDs = [];
// by gsf, 白名单,及触发动作
// whitelist, and trigger action
var whiteIDs = [{
id: 'omnibar-defaultEngine',
popMemu: 'omnibar-engine-menu',
run: function(overElem) {
document.getElementById('omnibar-in-urlbar').click(0);
}
},
{
id: 'ucjs_zoom_statuslabel',
popMemu: 'ucjs_zoom-context',
run: null
},
{
id: 'UserScriptLoader-icon',
popMemu: 'UserScriptLoader-popup',
run: null
},
{
id: 'readLater',
popMemu: 'readLater-popup',
run: null
//function(overElem) {PopElt.popup();}
},
{
id: 'foxyproxy-toolbar-icon',
popMemu: 'foxyproxy-toolbarbutton-popup',
run: null
}];
var whitesInx = -1;
var popupPos = ['after_start', 'end_before', 'before_start', 'start_before'];
var menuPanelID = 'PanelUI-popup';
var downPanelID = 'downloadsPanel';
var widgetPanelID = 'customizationui-widget-panel';
function IsWidgetBtn(elt) {
try {
return elt.hasAttribute('widget-id')
&& elt.getAttribute('widget-type') == 'view';
} catch(e) {
return false;
}
}
function IsSearchBtn(elt) {
try {
return elt.getAttribute('anonid') == 'searchbar-search-button'
|| whitesInx === 0;
} catch(e) {
return false;
}
}
function IsNewMenuBtn(elt) {
try {
return elt.id == 'PanelUI-menu-button';
} catch(e) {
return false;
}
}
function IsDownloadBtn(elt) {
try {
return elt.localName == 'toolbarbutton'
&& elt.id == 'downloads-button';
} catch(e) {
return false;
}
}
function IsAutoComplete(elt) {
try {
return elt.getAttribute('type').substr(0, 12) == 'autocomplete';
} catch(e) {
return false;
}
}
function getPopupMenu(elt) {
if (whitesInx > -1 && PopElt)
return PopElt;
var nodes = elt ? elt.ownerDocument.getAnonymousNodes(elt) : null;
for (let [i, k] in Iterator(nodes)) {
if (k.localName == 'menupopup')
return k;
}
var s = elt.getAttribute('popup');
return s ? document.getElementById(s) : null;
}
function isBlackNode(elt) {
return BlackIDs.some(function(css) {
try {
var nodes = document.querySelectorAll(css);
} catch(e) {
return false;
}
for (var node of nodes) {
if (node == elt)
return true;
}
return false;
})
}
function getPopupPos(elt) {
var x, y, pos, box;
for (pos = 0, x = elt.boxObject.screenX, y = elt.boxObject.screenY;
elt != null; elt = elt.parentNode)
{
if (elt.localName == 'window' || !elt.parentNode)
break;
else if (elt.localName != 'toolbar' && elt.localName != 'hbox'
&& elt.localName != 'vbox');
else if (elt.boxObject.height >= 3 * elt.boxObject.width) {
if (elt.boxObject.height >= 45) {
pos = 9;
break;
}
} else if (elt.boxObject.width >= 3 * elt.boxObject.height) {
if (elt.boxObject.width >= 45) {
pos = 8;
break;
}
}
}
try {
box = elt.boxObject;
x = (pos & 1) ? (x <= box.width / 2 + box.screenX ? 1 : 3) :
(y <= box.height / 2 + box.screenY ? 0 : 2);
} catch(e) {
x = 0;
}
return popupPos[x];
}
function getPopupNode(node) {
if (whitesInx > -1 && PopElt)
return PopElt;
var elt, isPop, s;
for (; node != null; node = node.parentNode) {
if (node == PopElt)
return node;
isPop = false; // Node isn't Popup node
s = node.localName;
if (s == 'menupopup' || s == 'popup' || s == 'menulist'
|| IsAutoComplete(node) || IsMenuButton(node))
isPop = true;
else if (s == 'dropmarker') {
if (node.getAttribute('type') == 'menu') {
elt = node.parentNode;
if (elt.firstChild.localName == 'menupopup')
isPop = true;
} else if (node.classList.contains('autocomplete-history-dropmarker'))
isPop = true;
} else if (s == 'menu')
isPop = (node.parentNode.localName == 'menubar');
else if (IsButton(node)) {
for (elt = node; (elt = elt.nextSibling) != null;) {
if (elt.localName == 'dropmarker' && elt.boxObject.width > 0
&& elt.boxObject.height > 0)
break;
}
if (elt) break;
}
if (isPop) break;
}
if (PopElt && node) {
// Whether node is child of PopElt
for (elt = node.parentNode; elt != null; elt = elt.parentNode) {
if (elt == PopElt)
return PopElt;
}
}
return isPop ? node : null;
}
function AutoPopup() {
PopTimer = null;
if (!overElt) return;
if (whitesInx > -1 && PopElt && whiteIDs[whitesInx].run) {
whiteIDs[whitesInx].run(overElt);
return;
}
!PopElt && (PopElt = overElt);
if (overElt.localName == 'dropmarker') {
if (overElt.classList.contains('urlbar-history-dropmarker'))
overElt.click();
else
PopElt.showPopup();
} else if (overElt.localName == 'menulist') {
overElt.open = true;
} else if (IsNewMenuBtn(overElt)) {
PanelUI.show();
PopElt = document.getElementById(menuPanelID);
} else if (IsWidgetBtn(overElt)) {
var cmdEvent = document.createEvent('xulcommandevent');
cmdEvent.initCommandEvent('command', true, true, window, 0, false,
false, false, false, null);
overElt.dispatchEvent(cmdEvent);
PopElt = document.getElementById(widgetPanelID);
} else if (IsDownloadBtn(overElt)) {
PopElt = document.getElementById(downPanelID);
DownloadsPanel.showPanel();
} else if (IsSearchBtn(overElt)) {
searchBar.openSuggestionsPanel();
//console.log('search click!');
} else {
PopElt = getPopupMenu(overElt);
try {
var Pos = getPopupPos(overElt);
PopElt.openPopup(overElt, Pos, 0, 0, false, false, null);
} catch(e) {
PopElt = null;
}
}
}
function HidePopup() {
try {
if (overElt.localName == 'dropmarker')
try {
PopElt.parentNode.closePopup();
} catch(e) {
PopElt.parentNode.parentNode.closePopup();
}
else if (overElt.localName == 'menulist')
PopElt.open = false;
else if (IsDownloadBtn(overElt))
DownloadsPanel.hidePanel();
//else if (IsNewMenuBtn(overElt) || IsWidgetBtn(overElt))
else if (PopElt && PopElt.hidePopup)
PopElt.hidePopup();
else if (PopElt.popupBoxObject)
PopElt.popupBoxObject.hidePopup();
else if (IsSearchBtn(overElt))
searchBar.textbox.closePopup();
} catch(e) { }
HideTimer = null;
overElt = PopElt = null;
}
function MouseOver(e) {
if (!AlwaysPop && !document.hasFocus())
return;
var popNode, n = e.originalTarget;
whitesInx = -1;
// gsf :some,forEach,filter等数组遍历方法接受第二个参数,表作用域this,可不用call了
if (n.hasAttribute('id') && whiteIDs.some(function(k,i,me) {
//for (let [i, k] in Iterator(whiteIDs)) {
if (k.id == n.id) {
overElt = n;
whitesInx = i;
PopElt = document.getElementById(k.popMemu);
PopTimer = setTimeout(AutoPopup, showDelay);
return true;
}
})) return;
popNode = getPopupNode(e.originalTarget);
if (!popNode || (popNode && popNode.disabled) || isBlackNode(popNode)) {
MouseOut();
return;
}
if (HideTimer) {
window.clearTimeout(HideTimer);
HideTimer = null;
}
try {
if (IsAutoComplete(popNode))
return;
for (var elt = popNode; elt != null; elt = elt.parentNode) {
if (elt.localName == 'menupopup' || elt.localName == 'popup')
return;
}
}
catch(e) { }
if (PopElt && popNode == PopElt && PopElt != overElt)
return;
if (overElt && popNode != overElt)
HidePopup();
overElt = popNode;
PopElt = null;
PopTimer = setTimeout(AutoPopup, showDelay);
}
function MouseOut(e) {
if (PopTimer) {
window.clearTimeout(PopTimer);
PopTimer = null;
}
if (!HideTimer && PopElt)
HideTimer = window.setTimeout(HidePopup, hideDelay);
}
function IsButton(elt) {
try {
return elt.localName == 'button' || elt.localName == 'toolbarbutton';
} catch(e) {
return false;
}
}
function IsMenuButton(elt) {
return IsNewMenuBtn(elt) || IsDownloadBtn(elt) || IsWidgetBtn(elt)
|| (IsButton(elt) && getPopupMenu(elt));
}
window.addEventListener('mouseover', MouseOver, false);
})();
Alles anzeigen
Ich ackere jetzt mal alle durch...
Dann sieh dir erstmal diese Liste an :wink:
Diese Version funktioniert.
// ==UserScript==
// @name AutoPopup.uc.js
// @description Auto popup menulist/menupopup
// @compatibility Firefox 30.0+
// @author GOLF-AT, modify by gsf & aborix
// @version 2017.9.04
// ==UserScript==
(function() {
const showDelay = 200;
const hideDelay = 500;
var overElt = null;
var PopElt = null;
var PopTimer = null;
var HideTimer = null;
var AlwaysPop = false;
var searchBar = null;
if (window.BrowserSearch)
searchBar = BrowserSearch.searchBar;
// by gsf, 支持Fx的CSS所有语法: #表示id,. 表示class,或[id='demo']
// Fx support all of CSS syntax: # indicates id, . represents class, or [id='demo']
var BlackIDs = [];
// by gsf, 白名单,及触发动作
// whitelist, and trigger action
var whiteIDs = [{
id: 'omnibar-defaultEngine',
popMemu: 'omnibar-engine-menu',
run: function(overElem) {
document.getElementById('omnibar-in-urlbar').click(0);
}
},
{
id: 'ucjs_zoom_statuslabel',
popMemu: 'ucjs_zoom-context',
run: null
},
{
id: 'UserScriptLoader-icon',
popMemu: 'UserScriptLoader-popup',
run: null
},
{
id: 'readLater',
popMemu: 'readLater-popup',
run: null
//function(overElem) {PopElt.popup();}
},
{
id: 'foxyproxy-toolbar-icon',
popMemu: 'foxyproxy-toolbarbutton-popup',
run: null
}];
var whitesInx = -1;
var popupPos = ['after_start', 'end_before', 'before_start', 'start_before'];
var menuPanelID = 'PanelUI-popup';
var downPanelID = 'downloadsPanel';
var widgetPanelID = 'customizationui-widget-panel';
function IsWidgetBtn(elt) {
try {
return elt.hasAttribute('widget-id')
&& elt.getAttribute('widget-type') == 'view';
} catch(e) {
return false;
}
}
function IsSearchBtn(elt) {
try {
return elt.getAttribute('anonid') == 'searchbar-search-button'
|| whitesInx === 0;
} catch(e) {
return false;
}
}
function IsNewMenuBtn(elt) {
try {
return elt.id == 'PanelUI-menu-button';
} catch(e) {
return false;
}
}
function IsDownloadBtn(elt) {
try {
return elt.localName == 'toolbarbutton'
&& elt.id == 'downloads-button';
} catch(e) {
return false;
}
}
function IsAutoComplete(elt) {
try {
return elt.getAttribute('type').substr(0, 12) == 'autocomplete';
} catch(e) {
return false;
}
}
function getPopupMenu(elt) {
if (whitesInx > -1 && PopElt)
return PopElt;
var nodes = elt ? elt.ownerDocument.getAnonymousNodes(elt) : null;
for (let node of nodes) {
if (node.localName == 'menupopup')
return node;
}
var s = elt.getAttribute('popup');
return s ? document.getElementById(s) : null;
}
function isBlackNode(elt) {
return BlackIDs.some(function(css) {
try {
var nodes = document.querySelectorAll(css);
} catch(e) {
return false;
}
for (var node of nodes) {
if (node == elt)
return true;
}
return false;
})
}
function getPopupPos(elt) {
var x, y, pos, box;
for (pos = 0, x = elt.boxObject.screenX, y = elt.boxObject.screenY;
elt != null; elt = elt.parentNode)
{
if (elt.localName == 'window' || !elt.parentNode)
break;
else if (elt.localName != 'toolbar' && elt.localName != 'hbox'
&& elt.localName != 'vbox');
else if (elt.boxObject.height >= 3 * elt.boxObject.width) {
if (elt.boxObject.height >= 45) {
pos = 9;
break;
}
} else if (elt.boxObject.width >= 3 * elt.boxObject.height) {
if (elt.boxObject.width >= 45) {
pos = 8;
break;
}
}
}
try {
box = elt.boxObject;
x = (pos & 1) ? (x <= box.width / 2 + box.screenX ? 1 : 3) :
(y <= box.height / 2 + box.screenY ? 0 : 2);
} catch(e) {
x = 0;
}
return popupPos[x];
}
function getPopupNode(node) {
if (whitesInx > -1 && PopElt)
return PopElt;
var elt, isPop, s;
for (; node != null; node = node.parentNode) {
if (node == PopElt)
return node;
isPop = false; // Node isn't Popup node
s = node.localName;
if (s == 'menupopup' || s == 'popup' || s == 'menulist'
|| IsAutoComplete(node) || IsMenuButton(node))
isPop = true;
else if (s == 'dropmarker') {
if (node.getAttribute('type') == 'menu') {
elt = node.parentNode;
if (elt.firstChild.localName == 'menupopup')
isPop = true;
} else if (node.classList.contains('autocomplete-history-dropmarker'))
isPop = true;
} else if (s == 'menu')
isPop = (node.parentNode.localName == 'menubar');
else if (IsButton(node)) {
for (elt = node; (elt = elt.nextSibling) != null;) {
if (elt.localName == 'dropmarker' && elt.boxObject.width > 0
&& elt.boxObject.height > 0)
break;
}
if (elt) break;
}
if (isPop) break;
}
if (PopElt && node) {
// Whether node is child of PopElt
for (elt = node.parentNode; elt != null; elt = elt.parentNode) {
if (elt == PopElt)
return PopElt;
}
}
return isPop ? node : null;
}
function AutoPopup() {
PopTimer = null;
if (!overElt) return;
if (whitesInx > -1 && PopElt && whiteIDs[whitesInx].run) {
whiteIDs[whitesInx].run(overElt);
return;
}
!PopElt && (PopElt = overElt);
if (overElt.localName == 'dropmarker') {
if (overElt.classList.contains('urlbar-history-dropmarker'))
overElt.click();
else
PopElt.showPopup();
} else if (overElt.localName == 'menulist') {
overElt.open = true;
} else if (IsNewMenuBtn(overElt)) {
PanelUI.show();
PopElt = document.getElementById(menuPanelID);
} else if (IsWidgetBtn(overElt)) {
var cmdEvent = document.createEvent('xulcommandevent');
cmdEvent.initCommandEvent('command', true, true, window, 0, false,
false, false, false, null);
overElt.dispatchEvent(cmdEvent);
PopElt = document.getElementById(widgetPanelID);
} else if (IsDownloadBtn(overElt)) {
PopElt = document.getElementById(downPanelID);
DownloadsPanel.showPanel();
} else if (IsSearchBtn(overElt)) {
searchBar.openSuggestionsPanel();
//console.log('search click!');
} else {
PopElt = getPopupMenu(overElt);
try {
var Pos = getPopupPos(overElt);
PopElt.openPopup(overElt, Pos, 0, 0, false, false, null);
} catch(e) {
PopElt = null;
}
}
}
function HidePopup() {
try {
if (overElt.localName == 'dropmarker')
try {
PopElt.parentNode.closePopup();
} catch(e) {
PopElt.parentNode.parentNode.closePopup();
}
else if (overElt.localName == 'menulist')
PopElt.open = false;
else if (IsDownloadBtn(overElt))
DownloadsPanel.hidePanel();
//else if (IsNewMenuBtn(overElt) || IsWidgetBtn(overElt))
else if (PopElt && PopElt.hidePopup)
PopElt.hidePopup();
else if (PopElt.popupBoxObject)
PopElt.popupBoxObject.hidePopup();
else if (IsSearchBtn(overElt))
searchBar.textbox.closePopup();
} catch(e) { }
HideTimer = null;
overElt = PopElt = null;
}
function MouseOver(e) {
if (!AlwaysPop && !document.hasFocus())
return;
var popNode, n = e.originalTarget;
whitesInx = -1;
// gsf :some,forEach,filter等数组遍历方法接受第二个参数,表作用域this,可不用call了
if (n.hasAttribute('id') && whiteIDs.some(function(k,i,me) {
if (k.id == n.id) {
overElt = n;
whitesInx = i;
PopElt = document.getElementById(k.popMemu);
PopTimer = setTimeout(AutoPopup, showDelay);
return true;
}
})) return;
popNode = getPopupNode(e.originalTarget);
if (!popNode || (popNode && popNode.disabled) || isBlackNode(popNode)) {
MouseOut();
return;
}
if (HideTimer) {
window.clearTimeout(HideTimer);
HideTimer = null;
}
try {
if (IsAutoComplete(popNode))
return;
for (var elt = popNode; elt != null; elt = elt.parentNode) {
if (elt.localName == 'menupopup' || elt.localName == 'popup')
return;
}
}
catch(e) { }
if (PopElt && popNode == PopElt && PopElt != overElt)
return;
if (overElt && popNode != overElt)
HidePopup();
overElt = popNode;
PopElt = null;
PopTimer = setTimeout(AutoPopup, showDelay);
}
function MouseOut(e) {
if (PopTimer) {
window.clearTimeout(PopTimer);
PopTimer = null;
}
if (!HideTimer && PopElt)
HideTimer = window.setTimeout(HidePopup, hideDelay);
}
function IsButton(elt) {
try {
return elt.localName == 'button' || elt.localName == 'toolbarbutton';
} catch(e) {
return false;
}
}
function IsMenuButton(elt) {
return IsNewMenuBtn(elt) || IsDownloadBtn(elt) || IsWidgetBtn(elt)
|| (IsButton(elt) && getPopupMenu(elt));
}
window.addEventListener('mouseover', MouseOver, false);
})();
Alles anzeigen
Gruß EDV Oldi