Link in Pocket speichern ist auch ein anderer Code, als Seite in Pocket speichern
Deswegen, Andreas, ich finde nicht die richtige Datei dafür.
Link in Pocket speichern ist auch ein anderer Code, als Seite in Pocket speichern
Deswegen, Andreas, ich finde nicht die richtige Datei dafür.
#context-pocket = Seite in Pocket speichern
#context-savelinktopocket = Link in Pocket speichern
#context-savelinktopocket = Link in Pocket speichern
Danke, Andreas, das behebt dann das Problem. Gewusst wie!!
Oder in Deutsch
menuitem[label="Seite in Pocket speichern"]
menuitem[label="Link in Pocket speichern"]
Oder in Deutsch
Danke, für dein Verständnis.
Deswegen, Andreas, ich finde nicht die richtige Datei dafür.
Was meinst du mit „Datei“?
Was meinst du mit „Datei“?
Mit "Datei" meinte ich die Datei, wo eventuell der Code drin sein könnte. Nun habe ich aber einfach den Selektor von Andreas genommen, mit dem Code von Endor [ hat er mir (uns) gestern für Pocket gegeben ] vereinigt, in die Datei "Haupt-Kontextmenue" von Endor eingefügt, und das war es dann.
Mit "Datei" meinte ich die Datei, wo eventuell der Code drin sein könnte.
OK, ich wollte nur mal nachfragen, um eventuell vorhandene falsche Assoziationen zu vermeiden. Wenn die sich erst einmal einnisten, wird es schwer, sie wieder auszumerzen.
Ja ich nutze Autopop-Up, hier das Script..
// ==UserScript==
// @name AutoPopup.uc.js
// @description Auto popup menulist/menupopup
// @compatibility Firefox 69
// @author GOLF-AT, modified by gsf & aborix
// @version 2019.08.09
// ==UserScript==
(function() {
const showDelay = 200; // delay of showing popups
const hideDelay = 500; // delay of hiding popups
const AlwaysPop = false; // show popups also when window is not focused
var overElt = null;
var PopElt = null;
var PopTimer = null;
var HideTimer = null;
// elements are CSS selector strings
var BlackIDs = [];
// 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;
const popupPos = ['after_start', 'end_before', 'before_start', 'start_before'];
const searchBar = window.BrowserSearch ? BrowserSearch.searchBar : null;
function IsButton(elt) {
return elt && (elt.localName == 'toolbarbutton' || elt.localName == 'button');
}
function IsWidgetBtn(elt) {
return IsButton(elt) &&
((elt.hasAttribute('widget-id') && elt.getAttribute('widget-type') == 'view')
|| elt.id == 'fxa-toolbar-menu-button' || elt.id == 'library-button'
|| elt.id == 'alltabs-button');
}
function IsSearchBtn(elt) {
return (elt && elt.className == 'searchbar-search-button') || whitesInx == 0;
}
function IsPanelMenuBtn(elt) {
return elt && elt.id == 'PanelUI-menu-button';
}
function IsDownloadBtn(elt) {
return elt && elt.id == 'downloads-button';
}
function IsMenuBtn(elt) {
return IsPanelMenuBtn(elt) || IsDownloadBtn(elt) || IsWidgetBtn(elt)
|| (IsButton(elt) && getPopupMenu(elt));
}
function IsOverflowBtn(elt) {
return elt && elt.id == 'nav-bar-overflow-button';
}
function IsUrlbarDropmarker(elt) {
return elt && elt.classList && elt.classList.contains('urlbar-history-dropmarker');
}
function IsCustomizationBtn(elt) {
return IsButton(elt) && elt.className == 'customizationmode-button';
}
function IsAutoComplete(elt) {
try {
return elt.getAttribute('type').substr(0, 12) == 'autocomplete';
} catch(e) { }
}
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 getPopupNode(node) {
if (whitesInx > -1 && PopElt)
return PopElt;
if (IsSearchBtn(node) || IsOverflowBtn(node) || node.id == 'sidebar-switcher-target')
return node;
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) || IsMenuBtn(node) || IsUrlbarDropmarker(node)) {
isPop = true;
} else if (s == 'dropmarker' && node.getAttribute('type') == 'menu'
&& node.parentNode.firstChild.localName == 'menupopup') {
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.width > 0 && elt.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 getPopupMenu(elt) {
if (whitesInx > -1 && PopElt)
return PopElt;
var nodes = elt ? elt.ownerDocument.getAnonymousNodes(elt) || elt.childNodes : null;
if (nodes) {
for (let node of nodes) {
if (node.localName == 'menupopup' || node.localName == 'panel')
return node;
}
}
var s = elt.getAttribute('popup');
return s ? document.getElementById(s) : null;
}
function getPopupPos(elt) {
if (elt.id == 'bookmarks-menu-button')
return null;
var x, y, pos, i;
for (pos = 0, x = elt.screenX, y = elt.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.height >= 3 * elt.width) {
if (elt.height >= 45) {
pos = 9;
break;
}
} else if (elt.width >= 3 * elt.height) {
if (elt.width >= 45) {
pos = 8;
break;
}
}
}
try {
i = (pos & 1) ? // is pos odd?
(x <= elt.width / 2 + elt.screenX ? 1 : 3) :
(y <= elt.height / 2 + elt.screenY ? 0 : 2);
} catch(e) {
i = 0;
}
return popupPos[i];
}
function AutoPopup() {
PopTimer = null;
if (!overElt)
return;
if (whitesInx > -1 && PopElt && whiteIDs[whitesInx].run) {
whiteIDs[whitesInx].run(overElt);
return;
}
if (!PopElt)
PopElt = overElt;
if (overElt.localName == 'dropmarker') {
PopElt.showPopup();
} else if (overElt.localName == 'menulist') {
overElt.open = true;
} else if (IsPanelMenuBtn(overElt)) {
PopElt = document.getElementById('appMenu-popup');
PanelUI.show();
} else if (IsWidgetBtn(overElt)) {
PopElt = document.getElementById('customizationui-widget-panel');
if (overElt.hasAttribute('onmousedown'))
overElt.dispatchEvent(new MouseEvent('mousedown'));
else
overElt.dispatchEvent(new UIEvent('command'));
} else if (IsDownloadBtn(overElt)) {
PopElt = document.getElementById('downloadsPanel');
DownloadsPanel.showPanel();
} else if (IsSearchBtn(overElt)) {
searchBar.openSuggestionsPanel();
} else if (IsOverflowBtn(overElt)) {
PopElt = document.getElementById('widget-overflow');
if (!overElt.open)
overElt.click();
} else if (overElt.id == 'sidebar-switcher-target') {
PopElt = document.getElementById('sidebarMenu-popup');
if (!overElt.classList.contains('active'))
SidebarUI.toggleSwitcherPanel();
} else if (IsUrlbarDropmarker(overElt)) {
PopElt = gURLBar.panel;
if (!gURLBar.textbox.hasAttribute('open'))
overElt.click();
} else {
PopElt = getPopupMenu(overElt);
if (IsCustomizationBtn(overElt))
overElt.open = true;
else {
try {
let Pos = getPopupPos(overElt);
PopElt.removeAttribute('hidden');
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) {
try {
PopElt.hidePopup();
} catch(e) { }
}
} else if (overElt.localName == 'menulist')
PopElt.open = false;
else if (PopElt && PopElt.hidePopup)
PopElt.hidePopup();
else if (PopElt.popupBoxObject)
PopElt.popupBoxObject.hidePopup();
else if (IsSearchBtn(overElt))
searchBar.textbox.closePopup();
else if (IsPanelMenuBtn(overElt))
PanelUI.hide();
} catch(e) { }
HideTimer = null;
overElt = PopElt = null;
}
function MouseOver(e) {
if (!AlwaysPop && !document.hasFocus())
return;
var popNode, n = e.originalTarget;
whitesInx = -1;
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() {
if (PopTimer) {
window.clearTimeout(PopTimer);
PopTimer = null;
}
if (!HideTimer && PopElt)
HideTimer = window.setTimeout(HidePopup, hideDelay);
}
window.addEventListener('mouseover', MouseOver, false);
})();
Alles anzeigen
Ich nutze nun das verlinkte Script von 2002Andreas:
Dort kann in Zeile 1197 eigentlich keine Klammer fehlen, denn der Code geht bis 1207
Ja ich nutze Autopop-Up, hier das Script..
Dann deaktivier das doch bitte mal, und teste dann.
Dann funktioniert dein Code mit den ausgeblendeten Einträgen einwandfrei...
Es liegt dann also am AutopopUp-Script....
Sollte man das dann in einem neuen Thread behandeln?
Den Code dazu hatte ich ja hier bereits in # 69 gepostet...
Dort kann in Zeile 1197 eigentlich keine Klammer fehlen, denn der Code geht bis 1207
Ich schrieb auch nicht von einer Klammer, sondern von einem Semikolon zwischen none und der abschließenden Klammer. Außerdem ist da kein !important, was eventuell dazu führen könnte, dass der Separator dennoch angezeigt wird. Du hast da wohl davor eine Zeile gelöscht, denn jetzt steht das in Zeile 1196.
Habs eingetragen, hatte aber keine Auswirkungen.. die Separatoren sind und waren ausgeblendet, vielen Dank!
Es liegt dann also am AutopopUp-Script....
Das Script macht genau das, was es soll.
Das hat auch weder mit dem Code von Endor noch mit der Nightlyversion etwas zu tun.
Ist hier im Fx 72 auch so, und ohne den Code von Endor.
Ob man das im Script anpassen kann bin ich überfragt.
(man könnte das Hamburgermenü deaktivieren im Script)
PS:
Mich würde das kirre machen, wenn jedesmal das Popup aufgeht, nur weil ich mit der Maus aus Versehen einen Button berühre. Zumal ich dann bei manchen Popups extra klicken muss, um es wieder zu schließen.
Dann kann ich auch gleich den Button anklicken wenn ich ihn brauche
Aber, jeder wie er mag.
Bitte teste mal diese aktuellere Version vom Script autopopup.uc.js
// ==UserScript==
// @name AutoPopup.uc.js
// @description Auto popup menulist/menupopup
// @compatibility Firefox 72
// @author GOLF-AT, modified by gsf & aborix
// @version 2019.11.22
// ==UserScript==
(function() {
const showDelay = 200; // delay of showing popups
const hideDelay = 500; // delay of hiding popups
const alwaysPop = false; // show popups also when window is not focused
var overElt = null;
var PopElt = null;
var PopTimer = null;
var HideTimer = null;
// elements are CSS selector strings
var blackIDs = [];
// 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;
const popupPos = ['after_start', 'end_before', 'before_start', 'start_before'];
const searchBar = window.BrowserSearch ? BrowserSearch.searchBar : null;
function IsButton(elt) {
return elt && (elt.localName == 'toolbarbutton' || elt.localName == 'button');
}
function IsWidgetBtn(elt) {
return IsButton(elt) &&
((elt.hasAttribute('widget-id') && elt.getAttribute('widget-type') == 'view')
|| elt.id == 'fxa-toolbar-menu-button' || elt.id == 'library-button'
|| elt.id == 'alltabs-button');
}
function IsSearchBtn(elt) {
return (elt && elt.className == 'searchbar-search-button') || whitesInx == 0;
}
function IsPanelMenuBtn(elt) {
return elt && elt.id == 'PanelUI-menu-button';
}
function IsDownloadBtn(elt) {
return elt && elt.id == 'downloads-button';
}
function IsMenuBtn(elt) {
return IsPanelMenuBtn(elt) || IsDownloadBtn(elt) || IsWidgetBtn(elt)
|| (IsButton(elt) && getPopupMenu(elt));
}
function IsOverflowBtn(elt) {
return elt && elt.id == 'nav-bar-overflow-button';
}
function IsUrlbarDropmarker(elt) {
return elt && elt.classList && elt.classList.contains('urlbar-history-dropmarker');
}
function IsCustomizationBtn(elt) {
return IsButton(elt) && elt.className == 'customizationmode-button';
}
function IsAutoComplete(elt) {
try {
return elt.getAttribute('type').substring(0, 12) == 'autocomplete';
} catch(e) {
return false;
}
}
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 getPopupNode(node) {
if (whitesInx > -1 && PopElt)
return PopElt;
if (IsSearchBtn(node) || IsOverflowBtn(node) || node.id == 'sidebar-switcher-target')
return node;
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) || IsMenuBtn(node) || IsUrlbarDropmarker(node)) {
isPop = true;
} else if (s == 'dropmarker' && node.getAttribute('type') == 'menu'
&& node.parentNode.firstChild.localName == 'menupopup') {
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.width > 0 && elt.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 getPopupMenu(elt) {
if (whitesInx > -1 && PopElt)
return PopElt;
var nodes = elt ? elt.childNodes : null;
if (nodes) {
for (let node of nodes) {
if (node.localName == 'menupopup' || node.localName == 'panel')
return node;
}
}
var s = elt.getAttribute('popup');
return s ? document.getElementById(s) : null;
}
function getPopupPos(elt) {
if (elt.id == 'bookmarks-menu-button')
return null;
var x, y, pos, i;
for (pos = 0, x = elt.screenX, y = elt.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.height >= 3 * elt.width) {
if (elt.height >= 45) {
pos = 9;
break;
}
} else if (elt.width >= 3 * elt.height) {
if (elt.width >= 45) {
pos = 8;
break;
}
}
}
try {
i = (pos & 1) ? // is pos odd?
(x <= elt.width / 2 + elt.screenX ? 1 : 3) :
(y <= elt.height / 2 + elt.screenY ? 0 : 2);
} catch(e) {
i = 0;
}
return popupPos[i];
}
function AutoPopup() {
PopTimer = null;
if (!overElt)
return;
if (whitesInx > -1 && PopElt && whiteIDs[whitesInx].run) {
whiteIDs[whitesInx].run(overElt);
return;
}
if (!PopElt)
PopElt = overElt;
if (overElt.localName == 'dropmarker') {
PopElt.showPopup();
} else if (overElt.localName == 'menulist') {
overElt.open = true;
} else if (IsPanelMenuBtn(overElt)) {
PopElt = document.getElementById('appMenu-popup');
PanelUI.show();
} else if (IsWidgetBtn(overElt)) {
PopElt = document.getElementById('customizationui-widget-panel');
if (overElt.hasAttribute('onmousedown'))
overElt.dispatchEvent(new MouseEvent('mousedown'));
else
overElt.dispatchEvent(new UIEvent('command'));
} else if (IsDownloadBtn(overElt)) {
PopElt = document.getElementById('downloadsPanel');
DownloadsPanel.showPanel();
} else if (IsSearchBtn(overElt)) {
searchBar.openSuggestionsPanel();
} else if (IsOverflowBtn(overElt)) {
PopElt = document.getElementById('widget-overflow');
if (!overElt.open)
overElt.click();
} else if (overElt.id == 'sidebar-switcher-target') {
PopElt = document.getElementById('sidebarMenu-popup');
if (!overElt.classList.contains('active'))
SidebarUI.toggleSwitcherPanel();
} else if (IsUrlbarDropmarker(overElt)) {
PopElt = gURLBar.panel;
if (!gURLBar.textbox.hasAttribute('open'))
overElt.click();
} else {
PopElt = getPopupMenu(overElt);
if (IsCustomizationBtn(overElt))
overElt.open = true;
else {
try {
let Pos = getPopupPos(overElt);
PopElt.removeAttribute('hidden');
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) {
try {
PopElt.hidePopup();
} catch(e) { }
}
} else if (overElt.localName == 'menulist')
PopElt.open = false;
else if (PopElt.hidePopup)
PopElt.hidePopup();
else if (PopElt.popupBoxObject)
PopElt.popupBoxObject.hidePopup();
else if (IsSearchBtn(overElt))
searchBar.textbox.closePopup();
else if (IsPanelMenuBtn(overElt))
PanelUI.hide();
else if (IsUrlbarDropmarker(overElt))
if (gURLBar.textbox.hasAttribute('open'))
overElt.click();
} catch(e) { }
HideTimer = null;
overElt = PopElt = null;
}
function MouseOver(e) {
if (!alwaysPop && !document.hasFocus())
return;
var popNode, n = e.originalTarget;
whitesInx = -1;
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) {
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() {
if (PopTimer) {
clearTimeout(PopTimer);
PopTimer = null;
}
if (!HideTimer && PopElt)
HideTimer = setTimeout(HidePopup, hideDelay);
}
window.addEventListener('mouseover', MouseOver, false);
})();
Alles anzeigen
Mfg.
Endor
Bitte teste mal
Bin zwar nicht Boersenfeger, aber
Ich bin Boersenfeger und sage
Vielen Dank!
Ist Dein Problem damit nun behoben?
Ansonsten wie immer gern geschehen.
Gern geschehen. Freut mich wenn Du das auch brauchen kannst.
Ich verwende das auch schon sehr lange. Möchte ich gar nicht mehr missen.
Obige Version hat wie üblich aborix gemacht. Ohne ihn, was würden wir
da bloß machen.
Mfg.
Endor
Ja, hier ist jetzt alles tutti...
Na prima!!
So soll es ja sein.
Mfg.
Endor