90楼#
发布于:2019-09-09 14:31
|
|
91楼#
发布于:2019-09-09 17:38
|
|
92楼#
发布于:2019-09-10 02:13
请问下
location == 'chrome://browser/content/browser.xul'是不是只能替换成 location.href.startsWith('chrome://browser/content/browser.x')我看有的人写的脚本里是就只把xul改成了xhtml location == 'chrome://browser/content/browser.xhtml' |
|
93楼#
发布于:2019-09-10 11:59
zhouhuajdsh:请问下都可以,只是前者这么做是为了向下兼容。 |
|
94楼#
发布于:2019-09-12 09:29
@333ywb 你好,我也有你的那几个脚本,能把你改好的脚本共享下么?谢谢
|
|
95楼#
发布于:2019-10-16 15:57
编辑掉
找到解决方法了 |
|
96楼#
发布于:2020-05-27 06:53
求楼主出手帮忙,谢谢!
下面脚本作用是在没有加载完成的图片占位符红叉上增加一个菜单项,点击后会重新加载所有未加载的图片。 现在功能失效了,在正常图片上右键菜单中也显示,而且即使在红叉图片上点击,也完全不起作用。1 showImageInit = function(){ mItem = document.createXULElement("menuitem"); mItem.setAttribute("label", "Reload Missing Images"); //mItem.setAttribute("accesskey", "C"); document.getElementById("contentAreaContextMenu").addEventListener("popupshowing", function(){ onPopupShowing(this); }, false); } onPopupShowing = function(aPopup){ aPopup.insertBefore(mItem, document.getElementById("context-copyimage")); mItem.setAttribute("oncommand", "gBrowser.selectedTab.reloadWithFlags(nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);"); mItem.hidden = !(gContextMenu.onImage && (!gContextMenu.target.naturalWidth || !gContextMenu.target.complete)); mItem.setAttribute("disabled", mItem.hidden); } showImageInit(); |
|
|
97楼#
发布于:2020-05-27 13:36
liuxb:求楼主出手帮忙,谢谢! showImageInit = function(){ mItem = document.createXULElement("menuitem"); mItem.setAttribute("label", "Reload Missing Images"); //mItem.setAttribute("accesskey", "C"); document.getElementById("contentAreaContextMenu").addEventListener("popupshowing", function(){ onPopupShowing(this); }, false); } onPopupShowing = function(aPopup){ aPopup.insertBefore(mItem, document.getElementById("context-copyimage")); mItem.setAttribute("oncommand", "BrowserReloadWithFlags(Ci.nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);"); mItem.hidden = !(gContextMenu.onImage && !gContextMenu.onCompletedImage); mItem.setAttribute("disabled", mItem.hidden); } showImageInit();我也不知道有没有修复。 |
|
98楼#
发布于:2020-05-27 16:03
|
|
|
上一页
下一页