右键单击关闭标签页,很小的UC脚本可以搞定, 需要右键菜单时,则同时按ctrl键

Published by Xianqiao Wang on April 12th, 2013

右键单击关闭标签页,很小的UC脚本可以搞定, 需要右键菜单时,则同时按ctrl键
代码:
gBrowser.mTabContainer.addEventListener("click", function(e) {
  if (e.target.localName == "tab" && e.button == 2 && !e.ctrlKey) {
    gBrowser.removeTab(e.target);
    e.stopPropagation();
    e.preventDefault();
  }
}, true); http://bbs.kafan.cn/thread-1545000-1-1.html