|
阅读:2011回复:6
有没有办法不重复点击书签钮
我是通过书签按钮点开书签的,一般情况下我每次都要点开二到三个书签,但是,每点一个书签,书签钮的下拉菜单就会关闭,需要再重新点击书签按钮,来来回回一直这样。
有没有办法,点击书签时,书签下拉不自动关闭?等我不需要了,点击空白处,再自动关闭! 能实现吗? |
|
|
1楼#
发布于:2011-12-15 13:51
Stay-Open Menu :: Add-ons for Firefox
中键或者ctrl+左键点击。 |
|
|
2楼#
发布于:2011-12-15 13:51
自动弹出菜单,很方便的。
自动弹出菜单.uc.rar // ==UserScript==
// @name AutoPopup.uc.js
// @description Auto popup menulist/menupopup
// @compatibility Firefox 2.0+
// @author GOLF-AT
// @version 1.8.0.20101230
(function() {
var PopElt = null; var DropElt = null;
var PopTimer = null; var HideTimer = null;
var AlwaysPop = false; var nDelay = 200;
function AutoPopup()
{
PopTimer = null;
if (DropElt) {
if (DropElt.localName!='dropmarker') {
var v = null;
try {
v = DropElt.ownerDocument.
getAnonymousNodes(DropElt);
}catch(ex) {}
if (v!=null && v.length!=0 && v[0].
localName=='menupopup')
PopElt = v[0];
else
PopElt = DropElt.childNodes[0];
}
else
PopElt = DropElt;
try {
PopElt.showPopup(PopElt.parentNode,
-1, -1, 'popup', 'bottomleft',
'topleft');
}catch(e) { PopElt = null; }
}
}
function HidePopup()
{
try {
if (PopElt.localName=='dropmarker')
PopElt.parentNode.closePopup();
else
PopElt.hidePopup();
}catch(e) {}
HideTimer = null; DropElt = null;
PopElt = null;
}
function MouseOver(e)
{
if (!AlwaysPop && !document.hasFocus())
return;
if (IsButton(e.target)) {
type = e.target.getAttribute('type');
if (type == 'menu-button') {
if (e.originalTarget!=e.target)
return;
}
else {
if (type != 'menu') return;
}
}
if (HideTimer) {
window.clearTimeout(HideTimer);
HideTimer = null;
}
try {
if ('PopupAutoComplete'==e.target.id.
substr(0,17))
return;
for(var elt=e.target; elt!=null; elt=
elt.parentNode) {
if (elt.localName=='popup' || elt.
localName=='menupopup')
return;
}
}catch(ex) {}
if (PopElt) {
if (DropElt!=null && e.target==DropElt)
return;
try {
if (PopElt.localName != 'dropmarker'
) {
for(var elt=e.target; elt!=null;
elt=elt.parentNode) {
if (elt == PopElt) return;
}
}
}catch(ex) {}
HidePopup();
}
DropElt = e.target;
PopTimer = setTimeout(AutoPopup, nDelay);
}
function MouseOut(e)
{
if (PopTimer) {
window.clearTimeout(PopTimer);
PopTimer = null;
}
if (!HideTimer && PopElt!=null)
HideTimer = window.setTimeout(HidePopup,
500);
}
function IsButton(elt) {
try {
return elt.localName=='toolbarbutton' || elt
.localName=='button';
}catch(e) { return false; }
}
function IsMenuButton(elt) {
if (!IsButton(elt)) return false;
for(var i=0; i<2; i++) {
try {
var nodes = i==0x01 ? elt.childNodes : elt.
ownerDocument.getAnonymousNodes(elt);
if (nodes!=null && nodes.length && nodes[0]
.localName=='menupopup')
return true;
}catch(e) {}
}
return false;
}
function EnumElement(elt) {
try {
if (elt.localName == 'prefpane') {
elt.addEventListener('paneload', function(e) {
setTimeout(function() { EnumElement(e.
target); }, 100);
}, false);
}
else if(elt.id=='sidebar' && !elt.hasAttribute(
'AutoPopup')) {
elt.setAttribute('AutoPopup', true)
elt.addEventListener('SidebarFocused',
function(e) { EnumElement(elt); }, false);
}
else if(elt.id == 'editBookmarkPanel')
return;
}catch(e) {}
for(var i=0; i<2; i++) {
var nodes = null;
try {
if (elt.localName == 'browser') {
i = 1;
nodes = elt.contentDocument.childNodes;
}
else
nodes = i==0x01 ? elt.childNodes : elt.
ownerDocument.getAnonymousNodes(elt);
}catch(e) { nodes = null; }
if (nodes == null) continue;
for(var n=0; n<nodes.length; n++) {
try {
var node = nodes[n];
if ('PopupAutoComplete'==node.getAttribute(
'id').substr(0,17) || 'menupopup'==node
.localName || node.localName=='popup')
;
else if (node.localName != 'dropmarker') {
if (node.localName=='menu' && 'menubar'
==node.parentNode.localName)
;
else if(!IsMenuButton(node))
node = null;
}
else if(node.getAttribute('type')=='menu') {
node = node.parentNode;
if (!node.firstChild || node.firstChild.
localName!='menupopup')
continue;
}
if (node == null) {
EnumElement(nodes[n]); continue;
}
if (node.hasAttribute('command')) continue;
node.addEventListener('mouseout', MouseOut,
false);
node.addEventListener('mouseover',MouseOver,
false);
}catch(e) {}
}
}
}
setTimeout(function() { EnumElement(document); }, 100);
})(); |
|
|
3楼#
发布于:2011-12-15 13:51
alanfly:Stay-Open Menu :: Add-ons for Firefox 安装了stay-open-menu还是要点中键才能”stay-open-menu“,直接点击左键就不行了。 另外有没有类似的UC或油猴,省一个扩展。 |
|
|
4楼#
发布于:2011-12-15 13:51
|
|
|
5楼#
发布于:2011-12-15 13:51
我把扩展禁用,把doNotCloseMenu.uc.js放进profile\chrome文件夹。重启后发现doNotCloseMenu没有用。 脚本失效还是脚本比不上扩展? |
|
|
6楼#
发布于:2011-12-15 13:51
没用过这个脚本,可以问作者。 |
|