Hallo BrokenHeart
In Beta und Nightly getestet, funktioniert einwandfrei.
Auch nach Neustart ist es da usw.
135 muss ich noch testen.
Vielen Dank für Deine Mühe.
Mfg.
Endor
Hallo BrokenHeart
In Beta und Nightly getestet, funktioniert einwandfrei.
Auch nach Neustart ist es da usw.
135 muss ich noch testen.
Vielen Dank für Deine Mühe.
Mfg.
Endor
In der Beta Version, auch nach mehrmaligem Neustart:
Hier leider nicht. Nichts zu finden.
Leider funktioniert dieses für mich sehr wichtige Script ab Firefox 136 Beta nicht mehr.
// ==UserScript==
// @name externalApplications.uc.js
// @namespace ithinc#mozine.cn
// @description External Applications
// @include main
// @compatibility Firefox 3.5.x 3.6.x 17.01
// @author ithinc
// @Version Fix by aborix
// @Version 20190108.2.0.0 Frei verschiebbare Schaltflächen von aborix
// @version 20091216.1.0.0 Final release
// @version 20091215.0.0.2 Handle toolbar apps and menu apps separately
// @version 20091212.0.0.1 Initial release
// ==/UserScript==
/* :::: External Applications :::: */
var gExternalApplications = {
toolbar: {
apps: [
{name: 'Wetter', path: 'C:\\Users\\xxxx\\Wetter'},
{name: 'Notepad++', path: 'C:\\Program Files\\Notepad++\\notepad++.exe'},
{name: 'Microsoft Outlook', path: 'C:\\Program Files (x86)\\Microsoft Office\\OFFICE14\\Outlook.exe'},
{name: 'Videolan Player', path: 'C:\\Program Files\\VideoLAN\\VLC\\vlc.exe'},
{name: 'Windows Explorer', path: 'C:\\Windows\\explorer.exe'},
{name: 'WinMergeU', path: 'F:\\Adaten\\Downloads\\Freecomander\\WinMerge-2.14.0\\WinMerge-2.16.12-x64-exe\\WinMerge\\WinMergeU.exe'},
{name: 'Filezilla', path: 'F:\\Adaten\\Downloads\\Filezilla\\FileZilla_3.10.3_win64\\FileZilla-3.56.2\\filezilla.exe'},
{name: 'CarotDAV', path: 'F:\\Adaten\\Downloads\\Dropbox\\CarotDAV1.9.9.portable\\CarotDAV\\CarotDAV.exe'},
{name: 'Pickpick', path: 'F:\\Adaten\\Downloads\\picpick\\picpick.exe'},
{name: 'Profilmanager', path: 'F:\\Adaten\\Downloads\\Firefox\\Profile-Manager\\profilemanager.exe'},
{name: 'Profile', path: 'C:\\Users\\xxxx\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles'},
{name: 'FreeCommander', path: 'F:\\Adaten\\Downloads\\FreeComander\\FreeCommanderPortable\\FreeCommanderPortable.exe'},
{name: 'TV Browser', path: 'F:\\Adaten\\Downloads\\TVBrowser\\tvbrowser_3.2.1_bin_transportable\\tvbrowser-transportable\\tvbrowser-transportable.exe'},
{name: 'Radio Sure', path: 'F:\\Adaten\\Downloads\\Radio\\RadioSure.exe'},
]
},
// Menü für Firefox Extras - Externe Anwendungen
menu: {
apps: [
{name: 'Notepad', path: 'C:\\WINDOWS\\system32\\notepad.exe'},
{name: 'Rechner', path: 'C:\\WINDOWS\\system32\\calc.exe'},
{name: 'DOS', path: 'C:\\WINDOWS\\system32\\cmd.exe'},
{name: 'separator'},
{name: 'UltraSearch', path: 'F:\\Adaten\\Downloads\\FreeComander\\UltraSearch\\UltraSearch.exe'},
{name: 'CarotDAV', path: 'F:\\Adaten\\Downloads\\Dropbox\\CarotDAV1.9.9.portable\\CarotDAV\\CarotDAV.exe'},
{name: 'Windows Explorer', path: 'c:\\windows\\explorer.exe'},/*x?????*/
{name: 'Internet Explorer', path: 'C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE', args: ['%u']},
{name: 'Firefox', path: 'F:\\Adaten\\Downloads\\Firefox'},
{name: 'Videos', path: 'F:\\Video'},
{name: 'Videos2', path: 'F:\\Adaten\\Müll'},
],
id: 'ExternalApplicationsMenu',
insertafter: 'menu_openAddons', // 'helpMenu', 'tools-menu' oder 'browserToolsSeparator'
label: 'Externe Anwendungen',
accesskey: 'A'
},
init: function() {
this.handleRelativePath(this.toolbar.apps);
this.handleRelativePath(this.menu.apps);
this.createToolbarbuttons(this.toolbar.apps);
if (this.menu.apps.length > 0) {
var refNode = document.getElementById(this.menu.insertafter);
if (refNode) {
var menu = refNode.parentNode.insertBefore(document.createXULElement('menu'), refNode.nextSibling);
menu.setAttribute('id', this.menu.id);
menu.setAttribute('label', this.menu.label);
menu.setAttribute('accesskey', this.menu.accesskey);
menu.appendChild(this.createMenupopup(this.menu.apps));
}
}
},
handleRelativePath: function(apps) {
for (var i=0; i<apps.length; i++) {
var app = apps[i];
if (app.path) {
app.path = app.path.replace(/\//g, '\\');
var ffdir = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('CurProcD', Ci.nsIFile).path;
if (/^(\.)/.test(app.path)) {
app.path = ffdir + '\\' + app.path;
}
else if (/^(\\)/.test(app.path)) {
app.path = ffdir.substr(0,2) + app.path;
}
}
}
},
exec: function(path, args) {
args = args || [];
for (var i=0; i<args.length; i++) {
args[i] = args[i].replace(/%u/g, gBrowser.currentURI.spec);
}
var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
file.initWithPath(path);
if (!file.exists()) {
Cu.reportError('File Not Found: ' + path);
return;
}
if (!file.isExecutable()) {
file.launch();
}
else {
var process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
process.init(file);
process.run(false, args, args.length);
}
},
createToolbarbuttons: function(apps) {
for (var i=0; i<apps.length; i++) {
var app = apps[i];
if (app.name != 'separator') {
createButton(app);
}
};
function createButton(app) {
var buttonId = app.name.replace(/ /g, '_').replace(/\+/g, 'Plus') + '-ExtApp-button';
try {
CustomizableUI.createWidget({
id: buttonId,
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
var attributes = {
id: buttonId,
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
label: app.name,
tooltiptext: app.name,
image: 'moz-icon:file:///' + app.path + '?size=16',
oncommand: 'gExternalApplications.exec(this.path, this.args);',
//style: 'margin: 0px 0px; background: none; box-shadow: none; border-color: transparent;' // dawlen add
};
for (var a in attributes) {
toolbaritem.setAttribute(a, attributes[a]);
};
toolbaritem.path = app.path;
toolbaritem.args = app.args;
return toolbaritem;
}
});
CustomizableUI.registerToolbarNode(tb);
} catch(e) {};
}
},
createMenupopup: function(apps) {
var menupopup = document.createXULElement('menupopup');
for (var i=0; i<apps.length; i++) {
var app = apps[i];
if (app.name == 'separator') {
menupopup.appendChild(document.createXULElement('menuseparator'));
}
else {
var item = menupopup.appendChild(document.createXULElement('menuitem'));
item.setAttribute('class', 'menuitem-iconic');
item.setAttribute('label', app.name);
item.setAttribute('image', 'moz-icon:file://' + app.path + '?size=16');
item.setAttribute('oncommand', 'gExternalApplications.exec(this.path, this.args);');
item.path = app.path;
item.args = app.args;
}
}
return menupopup;
}
};
gExternalApplications.init();
Alles anzeigen
Habe es so zu ändern versucht aber das funktioniert nicht.
// ==UserScript==
// @name externalApplications.uc.js
// @namespace ithinc#mozine.cn
// @description External Applications
// @include main
// @compatibility Firefox 3.5.x 3.6.x 17.01
// @author ithinc
// @Version Fix by aborix
// @Version 20190108.2.0.0 Frei verschiebbare Schaltflächen von aborix
// @version 20091216.1.0.0 Final release
// @version 20091215.0.0.2 Handle toolbar apps and menu apps separately
// @version 20091212.0.0.1 Initial release
// ==/UserScript==
/* :::: External Applications :::: */
var gExternalApplications = {
toolbar: {
apps: [
{name: 'Wetter', path: 'C:\\Users\\xxxx\\Wetter'},
{name: 'Notepad++', path: 'C:\\Program Files\\Notepad++\\notepad++.exe'},
{name: 'Microsoft Outlook', path: 'C:\\Program Files (x86)\\Microsoft Office\\OFFICE14\\Outlook.exe'},
{name: 'Videolan Player', path: 'C:\\Program Files\\VideoLAN\\VLC\\vlc.exe'},
{name: 'Windows Explorer', path: 'C:\\Windows\\explorer.exe'},
{name: 'WinMergeU', path: 'F:\\Adaten\\Downloads\\Freecomander\\WinMerge-2.14.0\\WinMerge-2.16.12-x64-exe\\WinMerge\\WinMergeU.exe'},
{name: 'Filezilla', path: 'F:\\Adaten\\Downloads\\Filezilla\\FileZilla_3.10.3_win64\\FileZilla-3.56.2\\filezilla.exe'},
{name: 'CarotDAV', path: 'F:\\Adaten\\Downloads\\Dropbox\\CarotDAV.portable\\CarotDAV\\CarotDAV.exe'},
{name: 'Pickpick', path: 'F:\\Adaten\\Downloads\\picpick\\picpick.exe'},
{name: 'Profilmanager', path: 'F:\\Adaten\\Downloads\\Firefox\\Profile-Manager\\profilemanager.exe'},
{name: 'Profile', path: 'C:\\Users\\xxxx\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles'},
{name: 'FreeCommander', path: 'F:\\Adaten\\Downloads\\FreeComander\\FreeCommanderPortable\\FreeCommanderPortable.exe'},
{name: 'TV Browser', path: 'F:\\Adaten\\Downloads\\TVBrowser\\tvbrowser_3.2.1_bin_transportable\\tvbrowser-transportable\\tvbrowser-transportable.exe'},
{name: 'Radio Sure', path: 'F:\\Adaten\\Downloads\\Radio\\RadioSure.exe'},
]
},
// Menü für Firefox Extras - Externe Anwendungen
menu: {
apps: [
{name: 'Notepad', path: 'C:\\WINDOWS\\system32\\notepad.exe'},
{name: 'Rechner', path: 'C:\\WINDOWS\\system32\\calc.exe'},
{name: 'DOS', path: 'C:\\WINDOWS\\system32\\cmd.exe'},
{name: 'separator'},
{name: 'UltraSearch', path: 'F:\\Adaten\\Downloads\\FreeComander\\UltraSearch\\UltraSearch.exe'},
{name: 'CarotDAV', path: 'F:\\Adaten\\Downloads\\Dropbox\\CarotDAV.portable\\CarotDAV\\CarotDAV.exe'},
{name: 'Windows Explorer', path: 'c:\\windows\\explorer.exe'},/*x?????*/
{name: 'Internet Explorer', path: 'C:\\Program Files\\Internet Explorer\\IEXPLORE.EXE', args: ['%u']},
{name: 'Firefox', path: 'F:\\Adaten\\Downloads\\Firefox'},
{name: 'Videos', path: 'F:\\Video'},
{name: 'Videos2', path: 'F:\\Adaten\\Müll'},
],
id: 'ExternalApplicationsMenu',
insertafter: 'menu_openAddons', // 'helpMenu', 'tools-menu' oder 'browserToolsSeparator'
label: 'Externe Anwendungen',
accesskey: 'A'
},
init: function() {
this.handleRelativePath(this.toolbar.apps);
this.handleRelativePath(this.menu.apps);
this.createToolbarbuttons(this.toolbar.apps);
if (this.menu.apps.length > 0) {
var refNode = document.getElementById(this.menu.insertafter);
if (refNode) {
var menu = refNode.parentNode.insertBefore(document.createXULElement('menu'), refNode.nextSibling);
menu.setAttribute('id', this.menu.id);
menu.setAttribute('label', this.menu.label);
menu.setAttribute('accesskey', this.menu.accesskey);
menu.appendChild(this.createMenupopup(this.menu.apps));
}
}
},
handleRelativePath: function(apps) {
for (var i=0; i<apps.length; i++) {
var app = apps[i];
if (app.path) {
app.path = app.path.replace(/\//g, '\\');
var ffdir = Cc['@mozilla.org/file/directory_service;1'].getService(Ci.nsIProperties).get('CurProcD', Ci.nsIFile).path;
if (/^(\.)/.test(app.path)) {
app.path = ffdir + '\\' + app.path;
}
else if (/^(\\)/.test(app.path)) {
app.path = ffdir.substr(0,2) + app.path;
}
}
}
},
exec: function(path, args) {
args = args || [];
for (var i=0; i<args.length; i++) {
args[i] = args[i].replace(/%u/g, gBrowser.currentURI.spec);
}
var file = Cc['@mozilla.org/file/local;1'].createInstance(Ci.nsIFile);
file.initWithPath(path);
if (!file.exists()) {
Cu.reportError('File Not Found: ' + path);
return;
}
if (!file.isExecutable()) {
file.launch();
}
else {
var process = Cc['@mozilla.org/process/util;1'].createInstance(Ci.nsIProcess);
process.init(file);
process.run(false, args, args.length);
}
},
createToolbarbuttons: function(apps) {
for (var i=0; i<apps.length; i++) {
var app = apps[i];
if (app.name != 'separator') {
createButton(app);
}
};
function createButton(app) {
var buttonId = app.name.replace(/ /g, '_').replace(/\+/g, 'Plus') + '-ExtApp-button';
try {
CustomizableUI.createWidget({
id: buttonId,
type: 'custom',
defaultArea: CustomizableUI.AREA_NAVBAR,
onBuild: function(aDocument) {
var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
var attributes = {
id: buttonId,
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
label: app.name,
tooltiptext: app.name,
image: 'moz-icon:file:///' + app.path + '?size=16',
//oncommand: 'gExternalApplications.exec(this.path, this.args);',
};
for (var a in attributes) {
toolbaritem.setAttribute(a, attributes[a]);
toolbaritem.addEventListener('command', event => {
if (event.button == 0) {
gExternalApplications.exec(this.path, this.args);
}
});
toolbaritem.path = app.path;
toolbaritem.args = app.args;
return toolbaritem;
}
}
});
} catch(e) {};
}
},
createMenupopup: function(apps) {
var menupopup = document.createXULElement('menupopup');
for (var i=0; i<apps.length; i++) {
var app = apps[i];
if (app.name == 'separator') {
menupopup.appendChild(document.createXULElement('menuseparator'));
}
else {
var item = menupopup.appendChild(document.createXULElement('menuitem'));
item.setAttribute('class', 'menuitem-iconic');
item.setAttribute('label', app.name);
item.setAttribute('image', 'moz-icon:file://' + app.path + '?size=16');
item.addEventListener ('command', function (event) {
if (event.button == 0) {
gExternalApplications.exec(this.path, this.args);
}
});
item.path = app.path;
item.args = app.args;
return menupopup;
}
}
},
};
gExternalApplications.init();
Alles anzeigen
Hat jemand von euch eine Idee?
Mfg.
Endor
Leider kann und muss ich das von milupo geschilderte Verhalten bestätigen.
Schaltfläche war mal kurz da und seit dem nicht mehr aufgetaucht. Keinerlei Meldung in Konsole.
Mfg.
Endor
Hat es dann wenigstens funktioniert?
Jein. Im 135er Fuchs geht es noch aber im Panel kann man nicht mehr Scrollen.
Wie milupo schon weiter oben angemerkt hat. Wäre der Wahnsinn wenn Du das auch noch hin kriegen würdest.
Viele vielen Dank im Voraus von mir!
Mfg.
Endor
Hier das Script:
// ==UserScript==
// @name wetterfuchsbutton.uc.js
// @compatibility Firefox 33. - 69+
// @include main
// @version 1.0.20190625
// ==/UserScript==
var wetterfuchs = {
urlobj: {
MO_Doppelklick: {url:"https://www.msn.com/de-de/wetter/heute/de/Berlin,BE,Deutschland/we-city-52.520,13.380",width:700,height:640},
MO_Rechtsklick: {url:"http://www.wetter.net/47/Berlin",width:850,height:630},
MO_Mittelklick: {url:"https://www.daswetter.com/wetter_Berlin-Europa-Deutschland-Berlin--1-26301.html",width:800,height:638},
DED_WetterAktuell: {url:"https://www.wetterkontor.de/de/deutschland_aktuell.asp?id=0&page=0&sort=0",width:625,height:865},
DED_Vorhersage: {url:"https://www.wetterkontor.de/de/wetter/deutschland.asp",width:670,height:780},
DED_Pollenbelastung: {url:"https://www.wetterkontor.de/de/bio/pollenflug-erle.asp",width:478,height:590},
DED_UVIndexVorhersage: {url:"https://www.wetterkontor.de/de/bio/uv-index.asp",width:478,height:590},
DE_WetterAktuell: {url:"https://www.dwd.de/DWD/wetter/aktuell/deutschland/bilder/wx_deutschland.jpg",width:780,height:520},
DE_Vorhersage: {url:"https://www.dwd.de/DWD/wetter/wv_allg/deutschland/film/vhs_deutschland.jpg",width:780,height:485},
DE_Unwetterwarnung: {url:"http://www.unwetterzentrale.de/images/map/deutschland_index.png",width:572,height:572},
DE_RegenradarAktuell: {url:"https://www.niederschlagsradar.de/image.ashx",width:568,height:530},
DE_RegenradarPrognose: {url:"https://www.niederschlagsradar.de/images.aspx?srt=loopvorhersage&jaar=-3®io=homepage&tijdid=&m=&d=&uhr=&mi=",width:568,height:530},
EU_AktuellVorhersage: {url:"https://www.wetterkontor.de/de/wetter/europa/",width:680,height:690},
EU_Unwetterwarnung: {url:"http://www.unwetterzentrale.de/images/map/europe_index.png",width:572,height:572},
EU_RegenradarAktuell: {url:"http://www.meteox.de/images.aspx?jaar=-3&voor=&soort=loop-bliksem&c=&n=&tijdid=20128241541",width:570,height:570},
EU_RegenradarPrognose: {url:"http://db.eurad.uni-koeln.de/prognose/data/aktuell/trh_eur_1h_movd1.gif",width:518,height:518},
WE_WetterAktuell: {url:"http://www.meteocentrale.ch/de/wetter/weltwetter.html#sytl",width:575,height:360},
RE_AktuellVorhersage: {url:"https://www.wetterkontor.de/de/wetter/deutschland/brandenburg-berlin.asp",width:675,height:640},
RE_Unwetterwarnung: {url:"https://www.wetterkontor.de/warnungen/wetterwarnungen-brandenburg-berlin.asp",width:850,height:480},
RE_RegenradarAktuell: {url:"https://www.niederschlagsradar.de/image.ashx?type=regioloop®io=bln&j=&m=&d=&mi=&uhr=&bliksem=0&voor=&srt=loop1stunde&tijdid=201194154",width:568,height:530},
RE_RegenradarPrognose: {url:"https://www.wetteronline.de/regenradar/berlin-bundesland?mode=interactive&wrx=52.51,13.41&wrm=8",width:850,height:850},
},
wfthrobber: "https://raw.github.com/ardiman/userChrome.js/master/wetterfuchsbutton/loading51.gif",
// alternativ z.B. wfthrobber: "chrome://global/skin/media/throbber.png"
createBtn: function() {
try {
CustomizableUI.createWidget({
id: 'wetterfuchs-toolbarbutton',
type: 'custom',
onBuild: function(aDocument) {
var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
var attributes = {
id: 'wetterfuchs-toolbarbutton',
class: 'chromeclass-toolbar-additional',
type: 'menu',
removable: 'true',
label: 'Wetterfuchs',
tooltiptext: 'Lokale und globale Wetter Infos',
oncontextmenu: "return false",
ondblclick: "if (event.button === 0) { wetterfuchs.openPanel(\'MO_Doppelklick\',event,\'b\')}",
onclick: "if (event.button === 1) {wetterfuchs.openPanel(\'MO_Mittelklick\',event,\'b\')};if (event.button === 2) {wetterfuchs.openPanel(\'MO_Rechtsklick\',event,\'b\')}",
style: 'list-style-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAD+0lEQVQ4jb3Tf0zUZRwH8LdgEngngitiMVBXcxH4h+lmETndkqVIOYemrewH4ipJmCjmmDLJRmrKBkPgMNYSMYNN3cQ1YoG4ovjpwQEnX+644ziP7/fbHd9z4SnH8+4PxXIWtLX13j7bsz17Xtvz+TwP8H9lfXx02NT62HJd3JHlurgHe9GhYX9/appkx+k31m0JKtEBzzdlLLz08+6FlxcAz9VtCi7JjtNv/NfQ60sXJQJA/VocutVx6I77+9fGbl/fNeG7nu53X355zNu89W5DSkA+AGyIj1o1I1i1KtQglyzn2MUk/+TNYgq1nEIuohg9TuHK56Qtg2PfxftdJ2L4zStzK6azHgOwoDNRf9Q/kEPeqiJ/MwiqZaRSQsqFpOswhSNL0PEeJ9pXsDVBd1IH3ZMA5jyiFSwOWt//2eIfTF+lyt3XjrCvrZjjN0vJsQpSOUbezCQdH5D2N0nrBk6aYun5+nHF+KmusXDJ/JRHwI7UrS9WH05TW1quUZLMorOjlacNp9j/ay7p2kmquyhGd5HOHeTwNgrLq0J0hfPGhyE9BUA0gICHwIq8vNy2tva7DoeDZrOZNTU1rK6uZl1dPc+fr+HF2uOUBw9SKPtJ18fk8FZOGqPYsy34l1Ig9iEwBogs+uLzVpPJRIvFIoxGIxsaGihJEm02G212O43dfaysrKC9L4/05JDOHRTmeKHVzOaVJH1tInRPTHmBGe9v3/NTc/P40NAQrVYrJUni4ODgPcxm4/DwMB0OBzs6Onm2qpAj/bmcdKZTmBbRtD2o80pw4MZ9gB4AkJaWFnHhwoU7qqrS6XSKkZGRB5DL5aIsy1QUhaqq0uVycWBggF1d7aLlx+OcuB4hpMwQaz6w5P4rAVJSUhJ6e3vpdrupKAplWaYkSTSZTJRlmZqm0ev10uv1UtM0jo+P0+fzcXBIFj1nEiekzBDnt0vnffKgfytXrlxWX1/v93g8dLvdtFqt7O7uFhaLhXa7nYqiUNM0appGVVXp8/mE3+/nrdvjrMrY214FJJUBkX8dSkRycvKpsrIy58VLl+5cbW6m0WgUHo+HsizT1NtLVVWpaRodIyNUVDdv+3x0jI6y8I017SeAp7OBuQBmTYEBAGL1ev27EWFhB/ZnZTkbm5rYb77BltZWGsrLRWPTVfaZB1h7tpKGL/ewsqTo992bNnXs0wfvBRD0T19vdjgQFQmkLwkPN2x+aVnbO3ExA6uB2p0vPGX7KOEZxzrgXE402rbMw7nVwOZS4NnpwKkEA4hZByRnAm/lA2tP6HHgaAgOngTW1ABJZ4AV9282awbrz2QBwQVAaCowpxiIMQCLUoE5ecD8t+/17D8l8H7NmD8Aw0h46qvM+RMAAAAASUVORK5CYII=)'
};
for (var a in attributes)
toolbaritem.setAttribute(a, attributes[a]);
appendMenupopup(toolbaritem);
return toolbaritem;
}
});
addCss();
} catch(e) { };
function appendMenupopup(toolbaritem) {
let mymenu = document.createXULElement('menupopup');
mymenu.id = 'wetterfuchsmenu';
toolbaritem.appendChild(mymenu);
function appendMenu(label, id, Items) {
let menu = document.createXULElement('menu');
menu.setAttribute('label', label);
mymenu.appendChild(menu);
let menupopup = document.createXULElement('menupopup');
menupopup.id = id;
menu.appendChild(menupopup);
for (let item of Items) {
let menuitem = document.createXULElement('menuitem');
menuitem.setAttribute('label', item[0]);
menuitem.setAttribute('oncommand', item[1]);
menupopup.appendChild(menuitem);
};
};
appendMenu("DE Wetterdaten", "wetterfuchsdatamenu", [
["Wetter aktuell", "wetterfuchs.openPanel(\'DED_WetterAktuell\',event,\'p\')"],
["Vorhersage", "wetterfuchs.openPanel(\'DED_Vorhersage\',event,\'p\')"],
["Pollenbelastung", "wetterfuchs.openPanel(\'DED_Pollenbelastung\',event,\'p\')"],
["UV-Index", "wetterfuchs.openPanel(\'DED_UVIndexVorhersage\',event,\'p\')"]
]);
appendMenu("DE Wetterkarten", "wetterfuchsDEmapsmenu", [
["Wetter aktuell", "wetterfuchs.openPanel(\'DE_WetterAktuell\',event,\'p\')"],
["Vorhersage", "wetterfuchs.openPanel(\'DE_Vorhersage\',event,\'p\')"],
["Unwetterwarnung", "wetterfuchs.openPanel(\'DE_Unwetterwarnung\',event,\'p\')"],
["Regenradar aktuell", "wetterfuchs.openPanel(\'DE_RegenradarAktuell\',event,\'p\')"],
["Regenradarprognose", "wetterfuchs.openPanel(\'DE_RegenradarPrognose\',event,\'p\')"]
]);
appendMenu("EU Wetter", "wetterfuchsEUmapsmenu", [
["Aktuell und Vorhersage", "wetterfuchs.openPanel(\'EU_AktuellVorhersage\',event,\'p\')"],
["Unwetterwarnung", "wetterfuchs.openPanel(\'EU_Unwetterwarnung\',event,\'p\')"],
["Regenradar aktuell", "wetterfuchs.openPanel(\'EU_RegenradarAktuell\',event,\'p\')"],
["Regenradarprognose", "wetterfuchs.openPanel(\'EU_RegenradarPrognose\',event,\'p\')"]
]);
appendMenu("Welt Wetter", "wetterfuchsWEmapsmenu", [
["Aktuell und Vorhersage", "wetterfuchs.openPanel(\'WE_WetterAktuell\',event,\'p\')"]
]);
appendMenu("Regionales Wetter", "wetterfuchsRegiomapsmenu", [
["Aktuell und Vorhersage", "wetterfuchs.openPanel(\'RE_AktuellVorhersage\',event,\'p\')"],
["Unwetterwarnung", "wetterfuchs.openPanel(\'RE_Unwetterwarnung\',event,\'p\')"],
["Regenradar aktuell", "wetterfuchs.openPanel(\'RE_RegenradarAktuell\',event,\'p\')"],
["Regenradarprognose", "wetterfuchs.openPanel(\'RE_RegenradarPrognose\',event,\'p\')"]
]);
};
function addCss() {
var css =
'@-moz-document domain(daswetter.com), \
domain(dwd.de), \
domain(meteocentrale.ch), \
domain(niederschlagsradar.de), \
domain(www.meteox.de), \
domain(msn.com), \
domain(wetter.faz.net), \
domain(wetter.de), \
domain(wetter.net), \
domain(wetterkontor.de), \
domain(wetteronline.de) { \
scrollbar {display: none !important} \
}';
if (Services.appinfo.version.split('.')[0] <= 56) {
css +=
'@-moz-document url(chrome://browser/content/browser.xhtml) { \
#wetterfuchs-toolbarbutton .toolbarbutton-icon {max-width: none !important} \
}';
};
var cssUri = Services.io.newURI('data:text/css,' + encodeURIComponent(css), null, null);
var SSS = Cc['@mozilla.org/content/style-sheet-service;1'].getService(Ci.nsIStyleSheetService);
SSS.loadAndRegisterSheet(cssUri, SSS.AGENT_SHEET);
};
},
init: function() {
this.createBtn();
let panel = document.createXULElement('panel');
panel.id = "wetterfuchs-panel";
panel.setAttribute('noautohide', "false");
panel.setAttribute('type', "arrow");
panel.setAttribute('onpopuphiding', "wetterfuchs.clearPanel()");
panel.setAttribute('onmousedown', "if (event.button == 1) wetterfuchs.openUrlFromPanel()");
document.getElementById('mainPopupSet').appendChild(panel);
let vbox = document.createXULElement('vbox');
panel.appendChild(vbox);
let browser = document.createXULElement('browser');
browser.id = "wetterfuchs-iframe";
browser.setAttribute('type', 'content');
browser.setAttribute('flex', '1');
browser.setAttribute('remote', 'true');
browser.setAttribute('src', this.wfthrobber);
vbox.appendChild(browser);
},
myEventhandler: function (e,toDo) {
switch (toDo) {
case "p":
e.preventDefault();
break;
case "s":
e.stopPropagation();
break;
case "b":
e.preventDefault();
e.stopPropagation();
break;
}
},
clearPanel: function() {
var myiframe = document.getElementById("wetterfuchs-iframe");
myiframe.parentNode.width = 146;
myiframe.parentNode.height = 146;
myiframe.setAttribute("src",this.wfthrobber);
},
openUrlFromPanel: function() {
openWebLinkIn(document.getElementById("wetterfuchs-iframe").getAttribute("src"),"tab");
document.getElementById("wetterfuchs-panel").hidePopup();
},
openPanel: function(bezeichner,e,toDo) {
this.myEventhandler(e,toDo);
var mymenu = document.getElementById("wetterfuchsmenu");
if (mymenu.state === "open" && e.button !== 0) return;
mymenu.hidePopup();
var myiframe = document.getElementById("wetterfuchs-iframe");
myiframe.parentNode.style.width = this.urlobj[bezeichner]["width"]+'px';
myiframe.parentNode.style.height = this.urlobj[bezeichner]["height"]+'px';
myiframe.setAttribute("src",this.urlobj[bezeichner]["url"]);
var mypanel = document.getElementById("wetterfuchs-panel");
mypanel.openPopup(document.getElementById("wetterfuchs-toolbarbutton"));
},
};
if (location == 'chrome://browser/content/browser.xhtml')
wetterfuchs.init();
Alles anzeigen
Es funktioniert aber nur in Verbindung mit einem Css Code, der unerwünschte Teile auf den jeweiligen Seiten ausblendet.
Meinst du den Wetterfuchs?
Wenn ja, es fügt eine Schaltfläche ein, Rechtsklick, Mittelklick und doppelklick öffnen jeweils Wetterseiten im Panel Linksklick öffnet ein Menü mit weiteren Wetterseiten usw.
Da wäre ich Dir auch sehr dankbar wenn du den Wetterfuchs wieder zum laufen kriegen würdest.
Hallo BrokenHeart
Vielen Dank. Funktioniert wieder einwandfrei.
Große Klasse.
Mfg.
Endor
Für searchEngineIcon.uc.js gibt es auch eine neue Version
// ==UserScript==
// @name searchEngineIcon.uc.js
// @namespace http://space.geocities.yahoo.co.jp/gl/alice0775
// @description replace the magnifying glass with the search engine's icon
// @include main
// @compatibility Firefox 137
// @author Alice0775
// @version 2025/02/04 23:00 Bug 1880913 - Move BrowserSearch out of browser.js
// @version 2024/03/01 00:00 Bug 1882577 - Make nsISearchEngine.getIconURL an async function
// @version 2023/12/24 00:00 Bug 1870644 use engine.getIconURL() instead engine.iconURI.spec
// @version 2023/02/08 10:00 remove -moz-image-region
// @version 2021/01/21 12:00 indicate engine name
// @version 2020/01/26 22:00 fix typo & simplify
// @version 2020/01/26 20:00 fox after DOM fullscreen
// @version 2019/11/22 00:00 workaround delayed initialize using gBrowserInit.delayedStartupFinished instead async Services.search.init()
// @version 2019/11/14 00:00 Fix 72+ Bug 1591145 Remove Document.GetAnonymousElementByAttribute
// @version 2019/06/24 11:00 Fix 68+ Bug 1518545 - Merge engine-current/ default notifications
// @version 2019/05/24 11:00 Fix overflowed/underflowed
// @version 2019/03/30 19:00 Fix 67.0a1 Bug 1492475 The search service init() method should simply return a Promise
// @version 2019/03/20 00:00 Fix 67.0a1
// @version 2018/11/29 00:00 Fix 67.0a1 Bug 1524593 - nsISearchService (aka nsIBrowserSearchService, previously) refactor to be mostly an asynchronouse
// @version 2018/11/29 00:00 Fix 65.0a1 Bug 1453264
// @version 2018/09/29 23:00 Fix 64.0a1
// @version 2018/09/24 23:00 Fix warning from nsIBrowserSearchService
// @version 2018/07*20 23:00 Fix change option > search
// @version 2017/11/17 02:00 Fx57
// @version 2015/09/08 02:00 Bug 827546
// ==/UserScript==
var searchengineicon = {
init: async function() {
if (!Services.search.isInitialized) {
await Services.search.init();
}
this.toggleImage("init");
window.addEventListener('aftercustomization', this, false);
window.addEventListener('MozDOMFullscreen:Exited', this, false);
Services.prefs.addObserver('browser.search.widget.inNavBar', this, false);
Services.obs.addObserver(this, "browser-search-engine-modified");
window.addEventListener("resize", this, false);
window.addEventListener('unload', this, false);
},
uninit: function(){
window.removeEventListener('aftercustomization', this, false);
window.removeEventListener('MozDOMFullscreen:Exited', this, false);
Services.prefs.removeObserver('browser.search.widget.inNavBar', this);
Services.obs.removeObserver(this, "browser-search-engine-modified");
window.removeEventListener("resize", this, false);
window.removeEventListener('unload', this, false);
},
toggleImage: async function(topic) {
Services.console.logStringMessage("toggleImage "+topic);
var searchbar = window.document.getElementById("searchbar");
if (!searchbar)
return;
let searchbutton = searchbar.querySelector(".searchbar-search-icon");
if (!searchbutton)
return;
Services.console.logStringMessage("toggleImage "+topic +" done");
let defaultEngine = await Services.search.getDefault();
var uri = await defaultEngine.getIconURL();
//var icon = PlacesUtils.getImageURLForResolution(window, uri);
searchbutton.setAttribute("style", "list-style-image: url('"+ uri +"') !important;/* -moz-image-region: auto !important;*/ width: 16px !important; padding: 2px 0 !important;");
searchbar._textbox.setAttribute("placeholder", searchbar.currentEngine.name);
},
observe(aSubject, aTopic, aPrefstring) {
if (aTopic == "browser-search-engine-modified") {
aSubject.QueryInterface(Components.interfaces.nsISearchEngine);
switch (aPrefstring) {
case "engine-current":
case "engine-default":
this.toggleImage(aPrefstring);
// Not relevant
break;
}
}
if (aTopic == 'nsPref:changed') {
// 設定が変更された時の処理
setTimeout(function(){searchengineicon.toggleImage(aTopic);}, 0);
}
},
_timer: null,
handleEvent: function(event){
switch (event.type) {
case "MozDOMFullscreen:Exited":
setTimeout(() => {this.toggleImage(event.type);}, 1000);
break;
case "aftercustomization":
this.toggleImage("aftercustomization");
break;
case 'unload':
this.uninit();
break;
}
}
}
// 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) {
searchengineicon.init();
} else {
let delayedStartupFinished = (subject, topic) => {
if (topic == "browser-delayed-startup-finished" &&
subject == window) {
Services.obs.removeObserver(delayedStartupFinished, topic);
searchengineicon.init();
}
};
Services.obs.addObserver(delayedStartupFinished,
"browser-delayed-startup-finished");
}
Alles anzeigen
Ob damit die Fehlermeldung weg ist kann ich aber nicht sagen.
Das ist anscheinend für den Autor nicht wichtig.
Mfg.
Endor
Hallo milupo
Hier das original Script von aborix.
// ==UserScript==
// @name uhr-panelbutton.uc.js
// @compatibility Firefox 107
// @include main
// @version 1.0
// ==/UserScript==
var uhr = {
urlobj: {
MO_Linksklick: {url:"https://uhr.ptb.de/",width:500,height:500},
},
wfthrobber: "https://raw.github.com/ardiman/userChrome.js/master/wetterfuchsbutton/loading51.gif", // alternativ z.B. wfthrobber: "chrome://global/skin/media/throbber.png",
createBtn: function() {
try {
CustomizableUI.createWidget({
id: 'uhr-toolbarbutton',
type: 'custom',
onBuild: function(aDocument) {
var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
var attributes = {
id: 'uhr-toolbarbutton',
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
type: 'button',
removable: 'true',
label: 'Uhr Panel',
tooltiptext: 'Aktuelle Uhrzeit',
onclick: "if (event.button === 0) {uhr.openPanel(\'MO_Linksklick\',event,\'b\')}",
style: 'list-style-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACrklEQVQ4jX2T3UuTURzHn3+j/6ILrwq88cLoJgpiEYQUwcKErKAXWi+E1dIZrTRQWQQzYZqilWvGpPmyC3OMtnQ02gvao/Lsxbk9e9phY+fTxRNLM/rCFw6ccz7n+4XfUZS/tLL6HdvjN7Ra3TRbPTRbPbS09dM3MIymafx9viEhBLbHbzhxaxanb5OJcJGJcJG30RIjSzq2MZVWq5vXI6P7IUII2i45uTys4lrIM/dth4RWYTltkM4IYhsVxkN5XixUaLkZotc5tBdyu6ufs4NbjCzpLKcNvqxXWCtKUgXTyZIkGC/R517BMVukqSOA1ztDo/Ohdi/dvhz+uEEsK4llJdG8ZLVgruM7kicDIUanE3yIGXSMFDhs6cEwDBqvT0dLBFMV4r8vJpcjJJcjpISkz72CyxMjWZL44wbdvhwHTn0yU7S09XNnKrc3tpDkwmHks+uMTid45oqQLEmiGcmSWmcqatBkW+N2Vz/KwdOveOjViKzpaLpE3akR+pZn2p+i/doEJ6/Os5apouoSVZckcjX8X7c59jzH+U67Cej25cjrVURNEk8VcDjmeOla4t5gjPfjQapSUq6a1kWdhFbBMlgwAZb2R1weVsnuCKSU1OsSKXc5PIvM/GjsiZpkdV3niEPlvv0pSt/AMMd7V5kJbTUge1zImJDfgI1sGddCnqaOAIFAAEXTNFo7BrGNqWxky/sBu1KImiSSLnNhtMKxc/cQQpiz4BmbwNITxOnbJLX1E13U96XIffpAJF3GPi9ptnpYXFzcO429ziEsPUEeejX8X7dJbf1kZb1COiP4rlWZnEtjn5ccvT7+7/+gKIoyOfWOM1eecHEohNO3iftzFffnKo7ZIheHQljaH5m9/yfDMJicesfdrl46bzyg88YD7tufMjPz8U/nXfoFmxjSB7qU4KIAAAAASUVORK5CYII=)'
};
for (var a in attributes)
toolbaritem.setAttribute(a, attributes[a]);
return toolbaritem;
}
});
} catch(e) { };
var css = '\
#uhr-toolbarbutton .toolbarbutton-icon {max-width: none !important;}\
';
var stylesheet = document.createProcessingInstruction('xml-stylesheet', 'type="text/css" href="data:text/css;utf-8,' + encodeURIComponent(css) + '"');
document.insertBefore(stylesheet, document.documentElement);
},
init: function() {
this.createBtn();
let panel = document.createXULElement('panel');
panel.id = "uhr-panel";
panel.setAttribute('noautohide', "false");
panel.setAttribute('type', "arrow");
panel.setAttribute('onpopuphiding', "uhr.clearPanel()");
panel.setAttribute('onmousedown', "if (event.button == 1) uhr.openUrlFromPanel()");
document.getElementById('mainPopupSet').appendChild(panel);
let vbox = document.createXULElement('vbox');
panel.appendChild(vbox);
let browser = document.createXULElement('browser');
browser.id = "uhr-iframe";
browser.setAttribute('type', 'content');
browser.setAttribute('flex', '1');
browser.setAttribute('remote', 'true');
browser.setAttribute('src', this.wfthrobber);
vbox.appendChild(browser);
// d = document.getElementById('uhr-panel');
// d.style.width="500px";
// d.style.height="500px";
},
myEventhandler: function (e,toDo) {
switch (toDo) {
case "p":
e.preventDefault();
break;
case "s":
e.stopPropagation();
break;
case "b":
e.preventDefault();
e.stopPropagation();
break;
}
},
clearPanel: function() {
myiframe = document.getElementById("uhr-iframe");
myiframe.parentNode.width = 146;
myiframe.parentNode.height = 146;
myiframe.setAttribute("src",this.wfthrobber);
},
openUrlFromPanel: function() {
openWebLinkIn(document.getElementById("uhr-iframe").getAttribute("src"),"tab");
document.getElementById("uhr-panel").hidePopup();
},
openPanel: function(bezeichner,e,toDo) {
this.myEventhandler(e,toDo);
var myiframe = document.getElementById("uhr-iframe");
myiframe.parentNode.style.width = this.urlobj[bezeichner]["width"]+'px';
myiframe.parentNode.style.height = this.urlobj[bezeichner]["height"]+'px';
myiframe.setAttribute("src",this.urlobj[bezeichner]["url"]);
var mypanel = document.getElementById("uhr-panel");
mypanel.openPopup(document.getElementById("uhr-toolbarbutton"));
},
};
uhr.init();
Alles anzeigen
Mfg.
Endor
Dieser Fehler war mir gleich aufgefallen.
Ändert aber nichts daran, dass das Script nicht funktioniert.
Mfg.
Endor
Ja ist hier auch so.
Die Meldung sagt ja nur, dass in Zeile 12 und Zeile 22 ein Fehler ist.
Wenn man die behebt passt es wieder. Wie keine Ahnung.
Mfg.
Endor
Hallo 2002Andreas .
Für Dein obiges Script gibt es eine neue Version:
Für Firefox 137
// ==UserScript==
// @name patchForBug1904014_allow_search_oneoff_with_empty_text.uc.js
// @description undoing Bug 1904014 - Remove function to do an empty search using the search bar one-off buttons.
// @include chrome://browser/content/browser.xhtml
// @async true
// @compatibility Firefox 137
// @version 2025/02/04 23:00 Bug 1880913 - Move BrowserSearch out of browser.js
// @version 2024/07/14 fix add search engene button
// @version 2024/07/8
// ==/UserScript==
(function() {
let func = SearchOneOffs.prototype._on_click.toString();
func = func.replace(
'if (!this.textbox.value) {',
'if (false) {'
);
SearchOneOffs.prototype._on_click = new Function(
func.match(/\(([^)]*)/)[1],
func.replace(/[^{]*\{/, '').replace(/}\s*$/, '')
);
})();
(function() {
let func = SearchOneOffs.prototype._on_command.toString();
func = func.replace(
'if (!this.textbox.value) {',
'if (false) {'
);
func = func.replace(
'lazy.SearchUIUtils',
`this.window.SearchUIUtils`
);
func = func.replace(
'lazy.PrivateBrowsingUtils',
`this.window.PrivateBrowsingUtils`
);
let AsyncFunction = Object.getPrototypeOf(async function(){}).constructor;
SearchOneOffs.prototype._on_command = new AsyncFunction(
func.match(/\(([^)]*)/)[1],
func.replace(/[^{]*\{/, '').replace(/}\s*$/, '')
);
})();
(function() {
let PSAC = document.getElementById("PopupSearchAutoComplete");
//PSAC.addEventListener("popupShowing", event => {
PSAC.addEventListener("click", event => {
if (event.button == 2) {
// Ignore right clicks.
return;
}
let button = event.originalTarget.closest("[class~='searchbar-engine-one-off-add-engine]");
if (button) {
return;
}
button = event.originalTarget.closest(".search-panel-header");
if (!button) {
return;
}
if (!this.searchbar.value) {
this.searchbar.handleSearchCommand(event, Services.search.defaultEngine);
}
});
PSAC.addEventListener("keydown", event => {
if (event.keyCode !== KeyEvent.DOM_VK_RETURN) {
// Ignore right clicks.
return;
}
let button = event.originalTarget.closest(".search-panel-header");
if (!button) {
return;
}
if (!this.searchbar.value) {
this.searchbar.handleSearchCommand(event, Services.search.defaultEngine);
}
});
//}, {once: true});
})();
// this._searchbarEngine = this.querySelector(".search-panel-header");
Alles anzeigen
Ob diese Version auch in Firefox 136 läuft kann ich leider nicht sagen.
Mfg.
Endor
Hallo zusammen.
Habe hier ein Script von
nach geändert:
for (var a in attributes)
toolbaritem.setAttribute(p, props[p]);
toolbaritem.addEventListener('click', event => {
if (event.button == 0) {
uhr.openPanel('MO_Linksklick',event,'b');
}
});
funktioniert so mal wieder nicht.
Das ganze Script:
// ==UserScript==
// @name uhr-panelbutton.uc.js
// @compatibility Firefox 134
// @include main
// @version 1.0.1
// ==/UserScript==
var uhr = {
urlobj: {
MO_Linksklick: {url:"https://uhr.ptb.de/",width:500,height:500},
},
wfthrobber: "https://raw.github.com/ardiman/userChrome.js/master/wetterfuchsbutton/loading51.gif", // alternativ z.B. wfthrobber: "chrome://global/skin/media/throbber.png",
createBtn: function() {
try {
CustomizableUI.createWidget({
id: 'uhr-toolbarbutton',
type: 'custom',
onBuild: function(aDocument) {
var toolbaritem = aDocument.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'toolbarbutton');
var attributes = {
id: 'uhr-toolbarbutton',
class: 'toolbarbutton-1 chromeclass-toolbar-additional',
type: 'button',
removable: 'true',
label: 'Uhr Panel',
tooltiptext: 'Aktuelle Uhrzeit',
style: 'list-style-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAACrklEQVQ4jX2T3UuTURzHn3+j/6ILrwq88cLoJgpiEYQUwcKErKAXWi+E1dIZrTRQWQQzYZqilWvGpPmyC3OMtnQ02gvao/Lsxbk9e9phY+fTxRNLM/rCFw6ccz7n+4XfUZS/tLL6HdvjN7Ra3TRbPTRbPbS09dM3MIymafx9viEhBLbHbzhxaxanb5OJcJGJcJG30RIjSzq2MZVWq5vXI6P7IUII2i45uTys4lrIM/dth4RWYTltkM4IYhsVxkN5XixUaLkZotc5tBdyu6ufs4NbjCzpLKcNvqxXWCtKUgXTyZIkGC/R517BMVukqSOA1ztDo/Ohdi/dvhz+uEEsK4llJdG8ZLVgruM7kicDIUanE3yIGXSMFDhs6cEwDBqvT0dLBFMV4r8vJpcjJJcjpISkz72CyxMjWZL44wbdvhwHTn0yU7S09XNnKrc3tpDkwmHks+uMTid45oqQLEmiGcmSWmcqatBkW+N2Vz/KwdOveOjViKzpaLpE3akR+pZn2p+i/doEJ6/Os5apouoSVZckcjX8X7c59jzH+U67Cej25cjrVURNEk8VcDjmeOla4t5gjPfjQapSUq6a1kWdhFbBMlgwAZb2R1weVsnuCKSU1OsSKXc5PIvM/GjsiZpkdV3niEPlvv0pSt/AMMd7V5kJbTUge1zImJDfgI1sGddCnqaOAIFAAEXTNFo7BrGNqWxky/sBu1KImiSSLnNhtMKxc/cQQpiz4BmbwNITxOnbJLX1E13U96XIffpAJF3GPi9ptnpYXFzcO429ziEsPUEeejX8X7dJbf1kZb1COiP4rlWZnEtjn5ccvT7+7/+gKIoyOfWOM1eecHEohNO3iftzFffnKo7ZIheHQljaH5m9/yfDMJicesfdrl46bzyg88YD7tufMjPz8U/nXfoFmxjSB7qU4KIAAAAASUVORK5CYII=)'
};
for (var a in attributes)
toolbaritem.setAttribute(p, props[p]);
toolbaritem.addEventListener('click', event => {
if (event.button == 0) {
uhr.openPanel('MO_Linksklick',event,'b');
}
});
return toolbaritem;
}
});
} catch(e) { };
var css = '\
#uhr-toolbarbutton .toolbarbutton-icon {max-width: none !important;}\
';
var stylesheet = document.createProcessingInstruction('xml-stylesheet', 'type="text/css" href="data:text/css;utf-8,' + encodeURIComponent(css) + '"');
document.insertBefore(stylesheet, document.documentElement);
},
init: function() {
this.createBtn();
let panel = document.createXULElement('panel');
panel.id = "uhr-panel";
panel.setAttribute('noautohide', "false");
panel.setAttribute('type', "arrow");
panel.setAttribute('onpopuphiding', "uhr.clearPanel()");
panel.setAttribute('onmousedown', "if (event.button == 1) uhr.openUrlFromPanel()");
document.getElementById('mainPopupSet').appendChild(panel);
let vbox = document.createXULElement('vbox');
panel.appendChild(vbox);
let browser = document.createXULElement('browser');
browser.id = "uhr-iframe";
browser.setAttribute('type', 'content');
browser.setAttribute('flex', '1');
browser.setAttribute('remote', 'true');
browser.setAttribute('src', this.wfthrobber);
vbox.appendChild(browser);
},
myEventhandler: function (e,toDo) {
switch (toDo) {
case "p":
e.preventDefault();
break;
case "s":
e.stopPropagation();
break;
case "b":
e.preventDefault();
e.stopPropagation();
break;
}
},
clearPanel: function() {
myiframe = document.getElementById("uhr-iframe");
myiframe.parentNode.width = 146;
myiframe.parentNode.height = 146;
myiframe.setAttribute("src",this.wfthrobber);
},
openUrlFromPanel: function() {
openWebLinkIn(document.getElementById("uhr-iframe").getAttribute("src"),"tab");
document.getElementById("uhr-panel").hidePopup();
},
openPanel: function(bezeichner,e,toDo) {
this.myEventhandler(e,toDo);
var myiframe = document.getElementById("uhr-iframe");
myiframe.parentNode.width = this.urlobj[bezeichner]["width"];
myiframe.parentNode.height = this.urlobj[bezeichner]["height"];
myiframe.setAttribute("src",this.urlobj[bezeichner]["url"]);
var mypanel = document.getElementById("uhr-panel");
mypanel.openPopup(document.getElementById("uhr-toolbarbutton"));
},
};
uhr.init();
Alles anzeigen
Was habe ich vergessen oder falsch gemacht?
Mfg.
Endor