Я себе вот такую прописал:
Пробовал и красную, но остановился на "яркой" черной под стиль меню
Отсутствует
Не знаю, правильно ли я всё сделал
Да, так лучше. Однако есть тонкость:
в target.setAttribute("onbla", "...") и target.onbla = ...
«return false» работает как e.preventDefault()
а в target.addEventListener("bla", ...)
«return false» так не работает.
Можно убедиться
STR: открываем #ujs_window_gt, переходим на вкладку с видосом,
переводим видос в полноэкранный режим, жмём Esc.
AR: #ujs_window_gt закрывается и видос выходит из полноэкранного режима.
Таким образом, вместо return false; лучше записать return e.preventDefault();
добавить папку по умолчанию допустим - меню закладок или сделать отдельным кодом
Как уже обсуждалось, здесь проще всего
переопределить PlacesCommandHook.bookmarkPage()
Следует отметить, что, в таком виде, это затронет
всю околозвёздочную систему добавления, например,
независимо от того, будет ли показана её панелька или нет.
((obj, meth, func = obj[meth]) => { obj[meth] = eval( `(${obj[meth]})` .replace(" ", " function ") .replace("unfiledGuid", "menuGuid") ); addDestructor(() => obj[meth] = func); })(PlacesCommandHook, "bookmarkPage");
Отсутствует
Dumby, то что надо
Отсутствует
Dumby вот в этом коде, можно ли сделать так, чтобы стиль тултипа остался и в нем не было в первой строчке this.label (в этом коде получается - если в тултипе нет this.label -то стиль не применяется для данной кнопки)
var ios = Components.classes["@mozilla.org/network/io-service;1"]. getService(Components.interfaces.nsIIOService); var sss = Components.classes["@mozilla.org/content/style-sheet-service;1"]. getService(Components.interfaces.nsIStyleSheetService); var css = new String(); css = css + '@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");'; css = css + 'tooltip[label^="' + this.label + '"] {'; css = css + "-moz-appearance: none !important;"; css = css + "border: 1px solid black !important;"; css = css + "max-width: none !important;"; css = css + "background: #ebf1f9 !important;"; css = css + "color: black !important;"; css = css + "font-family: monospace !important;"; css = css + "opacity: 0.9 !important;"; css = css + "border-radius: 5px !important;"; css = css + "-moz-border-radius: 5px !important;"; css = css + "font-size: 16px !important;"; css = css + "padding: 4px 8px !important;"; css = css + "}"; var uss = ios.newURI("data:text/css," + encodeURIComponent(css), null, null); if (!sss.sheetRegistered(uss, sss.AGENT_SHEET)) sss.loadAndRegisterSheet(uss, sss.AGENT_SHEET); this.onDestroy = function(reason) { if (reason == "update") { if (sss.sheetRegistered(uss, sss.AGENT_SHEET)) sss.unregisterSheet(uss, sss.AGENT_SHEET); } if (reason == "delete") { if (sss.sheetRegistered(uss, sss.AGENT_SHEET)) sss.unregisterSheet(uss, sss.AGENT_SHEET); } } this.showClipboard = function() { var code = custombuttons.cbService.readFromClipboard(); this.tooltipText = code ? this.label + "\n\n" + code: this.label; } this.setAttribute("onmouseover", "this.showClipboard()");
Отсутствует
Andrey_Krropotkin
№14194 После открытия Персонализации, в контекстном меню вместо значка появляется текст тултипа и требуется перезапуск, чтобы вернуть значок. Можно подправить?
Отредактировано voqabuhe (29-01-2020 01:04:15)
Отсутствует
можно ли сделать так, чтобы стиль тултипа остался и в нем не было в первой строчке this.label
Это шутка такая? Да, можно:
замени все this.label на "гopшoк нe в пeчкe"
Кстати, а упростить не хочешь?
И, если у тебя тултипы никак не стилизованы,
то здесь четыре строки про css можно попробовать
просто заменить на одну: tooltip.style.cssText = css;
(css => { this.setAttribute("tooltip", "_child"); var tooltip = this.appendChild(document.createXULElement("tooltip")); this.onmouseover = () => tooltip.label = (gClipboard.read() || "[ пусто ]").slice(0, 1500); css = `#${_id} > tooltip {${css.replace(/;/g, " !important;")}}`; var args = ["data:text/css;charset=utf-8," + encodeURIComponent(css), windowUtils.AGENT_SHEET]; windowUtils.loadSheetUsingURIString(...args); addDestructor(() => windowUtils.removeSheetUsingURIString(...args)); })(` -moz-appearance: none; border: 1px solid black; max-width: none; background: #ebf1f9; color: black; font-family: monospace; opacity: 0.9; border-radius: 5px; font-size: 16px; padding: 4px 8px; `);
После открытия Персонализации, в контекстном меню вместо значка появляется текст
Это, что называется, «Здесь вам не XBL».
В данном случае, class нужен сразу, поэтому, порядку
1. Создание элемента.
2. Добавление элемента на DOM-дерево.
3. Установка элементу атрибутов.
следует отдать предпочтение порядку
1. Создание элемента.
2. Установка элементу атрибутов.
3. Добавление элемента на DOM-дерево.
(attrs => { var menuitem = document.createXULElement("menuitem"); for(var attr in attrs) menuitem.setAttribute(attr, attrs[attr]); document.getElementById("context-navigation").append(menuitem); addDestructor(() => menuitem.remove()); })({ id: "context-close-tab", label: "Close Tab / Home page", tooltiptext: "LMB: Close Tab / RMB: Home page", class: "menuitem-iconic", image: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAABLUlEQVRYhe3XsU7DMBCA4YMOGchjde7mF0CCwZK3VLVrq74FZl6Anb5A2elzVTBEKQVMene+IIae1DH3f4oUWwW4zH+drutuQswPzrlGusMYM1ulzR0AXvPjCd9CwncfcSdBGGNmPuJLvyM/kxHWYjvEhx8XcRr/3EFAlOJcRClORviEj6UHqYix+HHHerP8FeCca3zMrxIEKR7z3lpsR1+hBKEWlyDU41zEJHEOYrJ4LUIlLkWoxrmISeIA/acWUt6eB8juDpX4JAhuXBUhjasgKHEf8156d6jErcW25gKrjg/PqCEk8a8I3FUhfMJ5SPkgPWSIiPvRt+DXeFtCUE+4MYRP+AQAV+d2/EBwj9cSghz/jpCe7acIdnyYEHBRc7E455r+j4kgfpm/mg9AapCabZBHlgAAAABJRU5ErkJggg==", oncommand: "gBrowser.removeTab(gBrowser.selectedTab, {animate: true});", oncontextmenu: "event.preventDefault(); hidePopup(); BrowserHome();" });
Отсутствует
Кн. видео в плеер (71-72) . Путь к плееру свой ( в двух местах!)
custombutton://%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%0D%0A%3Ccustombutton%20xmlns%3Acb%3D%22http%3A//xsms.nm.ru/custombuttons/%22%3E%0A%20%20%3Cname%3E%u0412%u0438%u0434%u0435%u043E%20%u0432%20PotPlayer%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bmoz-icon%3A//file%3A//D%3A%5CPotPlayer%5CPotPlayer.exe%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B%0A%0A/*Initialization%20Code*/%0A%0Avar%20path%20%3D%20%27D%3A%5C%5CPotPlayer%5C%5CPotPlayer.exe%27%0A%0Avar%20sysPlayerName%20%3D%20%22POTlayer%22%3B%0A%0Avar%20openIn%20%3D%20%22%u041E%u0442%u043A%u044B%u0442%u044C%20%u0432%20%22+sysPlayerName%3B%0Avar%20videoMoved%20%3D%20%22%u0412%u0438%u0434%u0435%u043E%20%u043F%u0435%u0440%u0435%u043D%u0435%u0441%u0435%u043D%u043E%20%u0432%20%22+sysPlayerName%3B%0Avar%20noFound%20%3D%20%22%u041D%u0435%20%u043D%u0430%u0439%u0434%u0435%u043D%u043E%20%u0432%u0438%u0434%u0435%u043E%20%u043D%u0430%20%u0441%u0442%u0440%u0430%u043D%u0438%u0446%u0435%2C%20%u0434%u043E%u0441%u0442%u0443%u043F%u043D%u043E%u0435%20%u0434%u043B%u044F%20%u043F%u0435%u0440%u0435%u043D%u043E%u0441%u0430%20%u0432%20%22+sysPlayerName%3B%0A%0Avar%20YoutubeID%20%3D%20/%28%3F%3Ayoutube%28%3F%3A-nocookie%29%3F%5C.com%5C/%28%3F%3A%5B%5E%5C/%5Cn%5Cs%5D+%5C/%5CS+%5C/%7C%28%3F%3Av%7Ce%28%3F%3Ambed%29%3F%29%5C/%7C%5CS*%3F%5B%3F%26%5Dv%3D%29%7Cyoutu%5C.be%5C/%29%28%5Ba-zA-Z0-9_-%5D%7B11%7D%29%28%3F%3A%5CW%7C%24%29/%3B%0A%0A%0A%0Aif%28%21%28cbu.getPrefs%28%22CB.video%22%29%29%20%7C%7C%20cbu.getPrefs%28%22CB.video%22%29.length%20%3C%209%29%20cbu.setPrefs%28%22CB.video%22%2C%20%22videotoplayer%22%29%3B%0Avar%20tmp%20%3D%20%27%27%2C%0Atmpp%20%3D%20%27%27%2C%0AinnerA%20%3D%20%27%3Cdiv%20style%3D%22display%3Ablock%21important%3Bcolor%3A%2300ff00%21important%3Bwidth%3A250px%21important%3Bfont%3Abold%2016px%20serif%21important%3Bz-index%3A999%21important%3Bopacity%3A1%21important%3Bvisibility%3A%20visible%21important%3B%27%2C%0AinnerB%20%3D%20%27left%3A5px%21important%3Bposition%3Aabsolute%21important%3Bheight%3Aauto%21important%3Bbox-sizing%3Aborder-box%21important%3Bpadding%3A5px%21important%3Bmargin%3A5px%21important%3B%27%2C%0AstopPl%20%3D%20%22javascript%3A%28function%28%29%7Bv%3Ddocument.getElementById%28%27movie_player%27%29%3Bif%28v%29%7Bv.stopVideo%28%29%7Delse%7Bv%3Ddocument.getElementsByTagName%28%27video%27%29%3Bif%28v%29%7Bv%5B0%5D.src%3D%27%27%3Btry%7Bv%5B0%5D.load%28%29%7Dcatch%28e%29%7B%7D%7D%3B%7D%7D%29%28%29%3B%22%2C%0AytIMGouter%20%3D%20function%28ytID%29%20%7Breturn%20%27%3Cdiv%20width%3D%22100%25%22%3E%3Cbr%20/%3E%3Ca%20target%3D%22_blank%22%20href%3D%22https%3A//www.youtube.com/watch%3Fv%3D%27%20+%20ytID%20+%20%27%22%3E%3Cimg%20src%3D%22https%3A//i.ytimg.com/vi/%27%20+%20ytID%20+%20%27/hqdefault.jpg%22%3E%3C/a%3E%3Cbr%20/%3E%27%20+%20innerA%20+%20%27background-color%3Ablack%21important%3Bposition%3Arelative%21important%3Bbottom%3A20px%21important%3B%22%3E%26nbsp%3B%26nbsp%3B%27%20+%20videoMoved%20+%20%27%3C/div%3E%3Cbr%20/%3E%3C/div%3E%3Cbr%20/%3E%27%7D%2C%0AhandlWin%20%3D%20function%28currentWin%29%20%7B%0Atmp%20%3D%20%27%27%3B%0Avar%20elem%20%3D%20currentWin.document.getElementsByTagName%28%27video%27%29%2C%20currLoc%20%3D%20currentWin.location%3B%0Aif%28elem.length%20%3E%200%29%20%7B%0Aif%28currLoc.hostname.indexOf%28%27youtu%27%29%20%21%3D%20-1%20%26%26%20%28tmp%20%3D%20currLoc.toString%28%29.match%28YoutubeID%29%29%20%26%26%20tmp%5B1%5D.length%20%3D%3D%2011%29%20%7B%0Aplay%28cbu.getPrefs%28%22CB.video%22%29%20%3D%3D%20%22videotoplaylist%22%20%3F%20%27https%3A//www.youtube.com/embed/%27%20+%20tmp%5B1%5D%20%3A%20%27https%3A//www.youtube.com/watch%3Fv%3D%27%20+%20tmp%5B1%5D%29%3B%0AvideoMovedbox%20%3D%20currentWin.document.createElement%28%27videoMoved%27%29%3B%0AvideoMovedbox.innerHTML%20%3D%20innerA%20+%20innerB%20+%20%27top%3A-15px%21important%3B%22%3E%3Cb%3E%27%20+%20videoMoved%20+%20%27%3C/b%3E%3C/div%3E%27%3B%0AloadURI%28stopPl%29%3B%0AcurrentWin.document.getElementById%28%27eow-title%27%29.appendChild%28videoMovedbox%29%3B%0Areturn%20true%3B%0A%7D%3B%0Afor%28i%20%3D%200%3B%20i%20%3C%20elem.length%3B%20i++%29%20%7B%0Aif%28%28%28tmp%20%3D%20getSrc%28elem%5Bi%5D.parentNode%2C%20currLoc%29%29%20%26%26%20tmp.length%20%3E%202%29%20%7C%7C%20%28i%20%3D%3D%200%20%26%26%20currentWin.document.body.innerHTML.substring%280%2C%207%29%20%3D%3D%20%27%3Cvideo%20%27%20%26%26%20%28tmp%20%3D%20currLoc.toString%28%29%29%29%29%20%7B%0AvideoMovedbox%20%3D%20currentWin.document.createElement%28%27videoMoved%27%29%3B%0AvideoMovedbox.innerHTML%20%3D%20innerA%20+%20innerB%20+%20%27top%3A20px%21important%3Bbackground-color%3Ablack%21important%3B%22%3E%27%20+%20videoMoved%20+%20%27%3C/div%3E%27%3B%0Aplay%28tmp%29%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%0Aif%28currLoc.hostname%20%3D%3D%20%27www.youtube.com%27%29%20%7B%0Aelem%5Bi%5D.parentNode.parentNode.appendChild%28videoMovedbox%29%3B%0A%7D%20else%20%7B%0Aelem%5Bi%5D.parentNode.appendChild%28videoMovedbox%29%3B%0A%7D%3B%0Aelem%5Bi%5D.src%20%3D%20%27%27%3B%0Atry%20%7B%0Aelem%5Bi%5D.load%28%29%0A%7D%20catch%28e%29%20%7B%7D%3B%0Areturn%20true%3B%0A%7D%0A%7D%0A%7D%3B%0A%0AcurrentWin._elems%20%3D%20currentWin.document.getElementsByTagName%28%27iframe%27%29%3B%0Aif%28currentWin._elems.length%20%3E%200%29%20%7B%0Afor%28currentWin._iCounter%20%3D%200%3B%20currentWin._iCounter%20%3C%20currentWin._elems.length%3B%20currentWin._iCounter++%29%20%7B%0Aif%28%28currentWin._elems%5BcurrentWin._iCounter%5D.src.indexOf%28%27youtube.com%27%29%20%3E%20-1%29%20%26%26%20%28tmp%20%3D%20currentWin._elems%5BcurrentWin._iCounter%5D.src.match%28YoutubeID%29%29%20%26%26%20%28tmp%5B1%5D.length%20%3D%3D%2011%29%29%20%7B%0Aplay%28cbu.getPrefs%28%22CB.video%22%29%20%3D%3D%20%22videotoplaylist%22%20%3F%20%27https%3A//www.youtube.com/embed/%27%20+%20tmp%5B1%5D%20%3A%20%27https%3A//www.youtube.com/watch%3Fv%3D%27%20+%20tmp%5B1%5D%29%3B%0AcurrentWin._elems%5BcurrentWin._iCounter%5D.outerHTML%20%3D%20ytIMGouter%28tmp%5B1%5D%29%3B%0Areturn%20true%3B%0A%7D%3B%0Aif%28currentWin._elems%5BcurrentWin._iCounter%5D.clientWidth%20%3E%2080%20%26%26%20currentWin._elems%5BcurrentWin._iCounter%5D.clientHeight%20%3E%2040%20%26%26%20handlWin%28currentWin._elems%5BcurrentWin._iCounter%5D.contentWindow%29%29return%20true%3B%0A%7D%0A%7D%3B%0A%0Aelem%20%3D%20currentWin.document.getElementsByTagName%28%27object%27%29%3B%0AcurrLoc%20%3D%20currentWin.location%3B%0Aif%28elem.length%20%3D%3D%200%29%20%7B%0Aelem%20%3D%20currentWin.document.getElementsByTagName%28%27embed%27%29%0A%7D%3B%0Aif%28elem.length%20%3E%200%29%20%7B%0Afor%28i%20%3D%200%3B%20i%20%3C%20elem.length%3B%20i++%29%20%7B%0Aif%28elem%5Bi%5D.innerHTML.indexOf%28%27youtu%27%29%20%21%3D%20-1%20%26%26%20%28tmp%20%3D%20elem%5Bi%5D.innerHTML.match%28YoutubeID%29%29%20%26%26%20tmp%5B1%5D.length%20%3D%3D%2011%29%20%7B%0Aplay%28cbu.getPrefs%28%22CB.video%22%29%20%3D%3D%20%22videotoplaylist%22%20%3F%20%27https%3A//www.youtube.com/embed/%27%20+%20tmp%5B1%5D%20%3A%20%27https%3A//www.youtube.com/watch%3Fv%3D%27%20+%20tmp%5B1%5D%29%3B%0Aelem%5Bi%5D.outerHTML%20%3D%20ytIMGouter%28tmp%5B1%5D%29%3B%0Areturn%20true%3B%0A%7D%20else%20%7B%0Aif%28elem%5Bi%5D.clientWidth%20%3E%2080%20%26%26%20elem%5Bi%5D.clientHeight%20%3E%2040%29%20%7B%0Aif%28%28%28tmp%20%3D%20getSrc%28elem%5Bi%5D.parentNode%2C%20currLoc%29%29%20%7C%7C%20%28tmp%20%3D%20getLink%28elem%5Bi%5D%2C%20currLoc%29%29%29%20%26%26%20tmp.length%20%3E%202%29%20%7B%0Aplay%28tmp%29%3B%0Aelem%5Bi%5D.outerHTML%20%3D%20innerA%20+%20%27background-color%3Ablack%21important%3Bbottom%3A20px%21important%3B%22%3E%26nbsp%3B%26nbsp%3B%27%20+%20videoMoved%20+%20%27%3C/div%3E%27%3B%0Areturn%20true%3B%0A%7D%3B%0A%7D%3B%0A%7D%0A%7D%3B%0A%7D%3B%0Areturn%20false%3B%0A%7D%3B%0A%0Athis.onclick%20%3D%20this.oncontextmenu%20%3D%20e%20%3D%3E%20%7B%0Aif%20%28e.target%20%21%3D%20this%29%20return%3B%0Aif%28e.button%20%3D%3D%200%29%20%7B%0Aif%28cbu.getPrefs%28%22CB.video%22%29.substring%280%2C6%29%20%3D%3D%20%22videom%22%29%7B%0Aelem%20%3D%20content.document.getElementsByTagName%28%27object%27%29%3B%0Aif%28elem.length%20%3D%3D%200%29%20%7B%0Aelem%20%3D%20content.document.getElementsByTagName%28%27embed%27%29%0A%7D%3B%0A%0AresizeObjs%28elem%29%3B%0AresizeObjs%28content.document.getElementsByTagName%28%27iframe%27%29%29%3B%0AresizeObjs%28content.document.getElementsByTagName%28%27video%27%29%29%3B%0A%7D%20else%20%7B%0Aif%28%21handlWin%28content%29%29custombuttons.alertSlide1%28noFound%29%3B%0A%7D%0A%7D%3B%0Aif%20%28%20e.button%20%3D%3D%202%20%26%26%20%21e.ctrlKey%20%26%26%20%21e.shiftKey%20%26%26%20%21e.altKey%20%26%26%20%21e.metaKey%20%29%20%7B%20//%20%u041F%u041A%u041C%0Ae.preventDefault%28%29%3B%0Avar%20file%20%3D%20Cc%5B%27@mozilla.org/file/local%3B1%27%5D.createInstance%28Ci.nsIFile%29%3B%0Afile.initWithPath%28%27D%3A%5C%5CPotPlayer%5C%5CPotPlayer.exe%27%29%3B%0Avar%20process%20%3D%20Cc%5B%22@mozilla.org/process/util%3B1%22%5D.createInstance%28Ci.nsIProcess%29%3B%0Avar%20link%20%3D%20gClipboard.read%28%29%3B%0Avar%20args%20%3D%20%5Blink%2C%22/play%22%5D%3B%0Aprocess.init%28%20file%20%29%3B%0Aprocess.run%28%20false%2C%20args%2C%20args.length%20%29%3B%0A%7D%0A%7D%3B%0Athis.oncontextmenu%20%3D%20e%20%3D%3E%20e.target%20%21%3D%20this%20%3F%20menu.hasAttribute%28%22context%22%29%0A%20%20%20%20%3A%20e.ctrlKey%20%7C%7C%20e.shiftKey%20%7C%7C%20e.altKey%20%7C%7C%20e.metaKey%20%7C%7C%20%28%0A%20%20%20%20%20%20%20%20e.detail%20%21%3D%201%20%3F%20menu.hidePopup%28%29%20%3A%20%21%21menu.openPopup%28this%2C%20%22after_start%22%29%0A%20%20%20%20%29%3B%0Acustombuttons.alertSlide1%20%3D%20function%28sTitle%29%20%7B%0Avar%20as%20%3D%20Components.classes%5B%22@mozilla.org/alerts-service%3B1%22%5D.getService%28Components.interfaces.nsIAlertsService%29%3B%0Aas.showAlertNotification%28%27chrome%3A//global/skin/icons/information-16.png%27%2C%20%22%22%2C%20sTitle%2C%20false%2C%20%22%22%2C%20null%29%3B%0AsetTimeout%28%28%29%20%3D%3E%20as.closeAlert%28%29%2C%20999%29%3B%0A%7D%3B%0Athis.tooltipText%3D%22%u041B%3A%20%u0412%u0438%u0434%u0435%u043E%20%u0432%20%u043F%u043B%u0435%u0435%u0440%5Cn%u041F%3A%20%u0412%u0438%u0434%u0435%u043E%20%u0438%u0437%20Clipboard%22%3B%0Afunction%20resizeObjs%28objs%29%20%7B%0Aif%28%21objs%29%20return%3B%0ALEVELS%20%3D%203%3B%0Adir%20%3D%20%28cbu.getPrefs%28%22CB.video%22%29%20%3D%3D%20%22videomaximize%22%29%20%3F%201%20%3A%20-1%3B%0Afor%28i%20%3D%200%3B%20i%20%3C%20objs.length%3B%20i++%29%20%7B%0Avar%20Width%20%3D%20new%20Array%28LEVELS%29%0Avar%20Height%20%3D%20new%20Array%28LEVELS%29%0AWidth%5B0%5D%20%3D%20objs%5Bi%5D.clientWidth%3B%0AHeight%5B0%5D%20%3D%20objs%5Bi%5D.clientHeight%3B%0Aif%28%28Width%5B0%5D%20%3E%20%28-20%20*%20dir%20+%20100%29%29%20%26%26%20%28Height%5B0%5D%20%3E%20%28-20%20*%20dir%20+%2060%29%29%29%20%7B%0Aobj%20%3D%20objs%5Bi%5D%3B%0Afor%28var%20k%20%3D%201%3B%0A%28%28k%20%3C%20LEVELS%29%20%26%26%20%28obj.parentNode%29%29%3B%20k++%29%20%7B%0Aobj%20%3D%20obj.parentNode%0AWidth%5Bk%5D%20%3D%20obj.clientWidth%3B%0AHeight%5Bk%5D%20%3D%20obj.clientHeight%3B%0A%7D%3B%0AWidth%5B0%5D%20%3D%20Width%5B0%5D%20+%20dir%20*%20%28Width%5B0%5D%20/%205%20%7C%200%29%3B%0AHeight%5B0%5D%20%3D%20Height%5B0%5D%20+%20dir%20*%20%28Height%5B0%5D%20/%205%20%7C%200%29%3B%0Aobjs%5Bi%5D.style.width%20%3D%20Width%5B0%5D%20+%20%22px%22%3B%0Aobjs%5Bi%5D.width%20%3D%20Width%5B0%5D%3B%0Aobjs%5Bi%5D.style.height%20%3D%20Height%5B0%5D%20+%20%22px%22%3B%0Aobjs%5Bi%5D.height%20%3D%20Height%5B0%5D%3B%0Aobj%20%3D%20objs%5Bi%5D%3B%0Afor%28var%20k%20%3D%201%3B%0A%28%28k%20%3C%20LEVELS%29%20%26%26%20%21%28objs%5Bi%5D.tagName%20%3D%3D%20%27IFRAME%27%29%20%26%26%20%28obj.parentNode%29%20%26%26%20%28Width%5Bk%5D%29%20%26%26%20%28Height%5Bk%5D%29%20%26%26%20%28Width%5Bk%5D%20%3E%20%28-20%20*%20dir%20+%20100%29%29%20%26%26%20%28Height%5Bk%5D%20%3E%20%28-20%20*%20dir%20+%2060%29%29%29%3B%20k++%29%20%7B%0Aobj%20%3D%20obj.parentNode%0AWidth%5Bk%5D%20%3D%20Width%5Bk%5D%20+%20dir%20*%20%28Width%5Bk%5D%20/%205%20%7C%200%29%3B%0AHeight%5Bk%5D%20%3D%20Height%5Bk%5D%20+%20dir%20*%20%28Height%5Bk%5D%20/%205%20%7C%200%29%3B%0Aobj.style.width%20%3D%20Width%5Bk%5D%20+%20%22px%22%3B%0Aobj.width%20%3D%20Width%5Bk%5D%3B%0Aobj.style.height%20%3D%20Height%5Bk%5D%20+%20%22px%22%3B%0Aobj.height%20%3D%20Height%5Bk%5D%3B%0A%7D%0A%7D%0A%7D%3B%0A%7D%3B%0A%0Afunction%20restProtHost%28lnkR%2C%20curLoc%29%20%7B%0Aif%28lnkR.length%3D%3D0%29return%20%27%27%3B%0Alet%20tr%20%3D%20lnkR.replace%28/%5E%3A%5C/%5C//%2C%20curLoc.protocol%20+%20%22//%22%29%3B%0Aif%28%21tr.match%28/%5Ehttps%3F%3A%5C/%5C//i%29%29%7B%0AlnkR%20%3D%20tr.replace%28/%5E%5C/+/%2C%20%27%27%29%3B%0Aif%28lnkR.split%28%27/%27%29%5B0%5D.split%28%27%3F%27%29%5B0%5D.split%28%27%23%27%29%5B0%5D.toLowerCase%28%29.match%28/%5E%28%3F%3A%5B-a-z%5Cd%5D+%5C.%29+%5Ba-z%5Cd%5D%7B2%2C6%7D%24/%29%29%7B%0Atr%20%3D%20curLoc.protocol%20+%20%27//%27%20+%20lnkR%3B%0A%7Delse%7B%0Atr%20%3D%20curLoc.protocol%20+%20%27//%27%20+%20curLoc.host%20+%20%22/%22%20+%20lnkR%3B%0A%7D%0A%7D%3B%0Areturn%20tr%3B%0A%7D%3B%0A%0Afunction%20getSrc%28vobj%2C%20currentLoc%29%20%7B%0Avar%20t%20%3D%20%27%27%2C%0Att%20%3D%20%27%27%3B%0Aif%28%28%28%28t%20%3D%20vobj.innerHTML.match%28/%3Cvideo.*%3F%5Cssrc%3D%28%3F%3A%28%3F%3A%27%28%5B%5E%27%5D*%29%27%29%7C%28%3F%3A%22%28%5B%5E%22%5D*%29%22%29%7C%28%5B%5E%5Cs%5D*%29%29/i%29%29%20%26%26%20%28t%29%20%26%26%20%28tt%20%3D%20t%5B1%5D%20%7C%7C%20t%5B2%5D%20%7C%7C%20t%5B3%5D%29%20%26%26%20tt.indexOf%28%27blob%3A%27%29%20%3D%3D%20-1%20%29%20%7C%7C%20%28%28t%20%3D%20vobj.innerHTML.match%28/%3Csource.*%3F%5Cssrc%3D%28%3F%3A%28%3F%3A%27%28%5B%5E%27%5D*%29%27%29%7C%28%3F%3A%22%28%5B%5E%22%5D*%29%22%29%7C%28%5B%5E%5Cs%5D*%29%29.*%3F%5Cstype%3D%5B%27%22%5D%3Fvideo%5C//i%29%29%20%26%26%20%28t%29%20%26%26%20%28tt%20%3D%20t%5B1%5D%20%7C%7C%20t%5B2%5D%20%7C%7C%20t%5B3%5D%29%29%29%20%26%26%20tt.length%20%3E%202%20%26%26%20tt.indexOf%28%27blob%3A%27%29%20%3D%3D%20-1%20%29%20%7B%0Aif%28tt.indexOf%28%22.mp4/%3F%22%29%20%3D%3D%20-1%29%20%7B%0Att%20%3D%20tt.replace%28/%26amp%3B/g%2C%20%22%26%22%29%0A%7D%3B%0At%20%3D%20restProtHost%28tt%2C%20currentLoc%29%3B%0Areturn%20t%3B%0A%7D%3B%0Areturn%20%27%27%3B%0A%7D%3B%0A%0Afunction%20getLink%28obj%2C%20curLocation%29%20%7B%0A%0A%0Aif%28%21obj%20%7C%7C%20%21obj.tagName%29%20return%20%27%27%3B%0Avar%20flashvars%20%3D%20%27%27%2C%0A//%20%20%20%20%20%20%20%20src%20%3D%20%27%27%2C%0Aq%20%3D%20obj.tagName.toLowerCase%28%29%3B%0A%0Avar%20getParam%20%3D%20function%28e%2C%20n%29%20%7B%0Avar%20v%20%3D%20%27%27%2C%0Ar%20%3D%20new%20RegExp%28%27%5E%28%27%20+%20n%20+%20%27%29%24%27%2C%20%27i%27%29%2C%0Aparam%20%3D%20e.getElementsByTagName%28%27param%27%29%3B%0Afor%28var%20igp%20%3D%200%2C%20p%3B%20p%20%3D%20param%5Bigp%5D%3B%20igp++%29%20%7B%0Aif%28p.hasAttribute%28%27name%27%29%20%26%26%20p.getAttribute%28%27name%27%29.match%28r%29%29%20%7B%0Av%20%3D%20p.getAttribute%28%27value%27%29%3B%0Abreak%0A%7D%3B%0A%7D%3B%0Areturn%20v%3B%0A%7D%3B%0A%0A%0Aif%28q%20%3D%3D%20%27object%27%29%20%7B%0A//%20%20%20%20%20%20%20%20src%20%3D%20obj.getAttribute%28%27data%27%29%20%7C%7C%20obj.getAttribute%28%27src%27%29%20%7C%7C%20getParam%28obj%2C%20%27movie%7Cdata%7Csrc%7Ccode%7Cfilename%7Curl%27%29%20%7C%7C%20%28obj.getElementsByTagName%28%27embed%27%29.length%20%3E%200%20%3F%20obj.getElementsByTagName%28%27embed%27%29%5B0%5D.getAttribute%28%27src%27%29%20%3A%20%27%27%29%3B%0Aflashvars%20%3D%20getParam%28obj%2C%20%27flashvars%27%29%3B%0A%7D%20else%20if%28q%20%3D%3D%20%27embed%27%29%20%7B%0A//%20%20%20%20%20%20%20%20src%20%3D%20obj.getAttribute%28%27src%27%29%3B%0Aflashvars%20%3D%20obj.getAttribute%28%27flashvars%27%29%3B%0A%7D%20else%20return%20%27%27%3B%0A%0A%0Aif%28%21flashvars%29%20return%20%27%27%3B%0A//%20%20%20src%20%3D%20restProtHost%28src%2C%20curLocation%29%3B%0A%0Avar%20restPath%20%3D%20function%28f%2C%20s%29%20%7B%0Areturn%28f.substring%280%2C%204%29%20%3D%3D%20%27http%27%29%20%3F%20f%20%3A%20s.replace%28/%5B%23%3F%5D.*%24/%2C%20%27%27%29.replace%28/%5B%5E%5C/%5D*%24/%2C%20f%29%0A%7D%3B%0A%0Afunction%20videoLinkExtract%28fl%29%20%7B%0A//alert%28fl%29%3B%0Avar%20linkArr%20%3D%20%5B%5D%2C%0AoutLinks%20%3D%20%5B%5D%2C%0Ajj%20%3D%200%2C%0Alba%20%3D%20%27%27%2C%0Albb%20%3D%20%27%27%2C%0AdecodeURL%20%3D%20gBrowser.currentURI.spec%3B%20%7B%0Atry%20%7B%0Areturn%20decodeURIComponent%28s%29%0A%7D%20catch%28e%29%20%7B%0Areturn%20unescape%28s%29%0A%7D%0A%7D%3B%0A%0Afor%28var%20ij%20%3D%200%3B%20ij%20%3C%203%3B%20ij++%29%20%7B%0Alba%20%3D%20lba%20+%20String.fromCharCode%28parseInt%28%28Math.random%28%29%20*%2015%20+%201%29%20+%20%27%27%2C%2010%29%29%3B%0Albb%20%3D%20lbb%20+%20String.fromCharCode%28parseInt%28%28Math.random%28%29%20*%2015%20+%2016%29%20+%20%27%27%2C%2010%29%29%3B%0A%7D%3B%0A%0Afunction%20pushWithMerit%28lnk%29%20%7B%0A%0Avar%20merit%20%3D%20-11%3B%0Aif%28lnk.match%28/%5Ehttps%3F%3A%5C/%5C//i%29%29%20merit%20%3D%20merit%20+%2040%3B%0Aif%28outLinks.length%20%3D%3D%200%29%20merit%20%3D%20merit%20+%201%3B%0Aif%28lnk.match%28/%5E%5C//%29%29%20merit%20%3D%20merit%20+%207%3B%0Aif%28lnk.match%28/%5E%5C/%5C//%29%29%20merit%20%3D%20merit%20+%2030%3B%0Aif%28lnk.match%28/240p%28%5B%5Ea-z%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%201%3B%0Aif%28lnk.match%28/%5B%5Ea-z%5D240%28%5B%5Ea-z0-9%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%201%3B%0Aif%28lnk.match%28/360p%28%5B%5Ea-z%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%203%3B%0Aif%28lnk.match%28/%5B%5Ea-z%5D360%28%5B%5Ea-z0-9%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%203%3B%0Aif%28lnk.match%28/480p%28%5B%5Ea-z%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%205%3B%0Aif%28lnk.match%28/%5B%5Ea-z%5D480%28%5B%5Ea-z0-9%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%205%3B%0Aif%28lnk.match%28/720p%28%5B%5Ea-z%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%207%3B%0Aif%28lnk.match%28/%5B%5Ea-z%5D720%28%5B%5Ea-z0-9%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%207%3B%0Aif%28lnk.match%28/%5C.mp4%28%5B%5Ea-z%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%208%3B%0Aif%28lnk.match%28/_hd%28%5B%5Ea-z%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20+%206%3B%0Aif%28lnk.match%28/%5C.%28jpg%7Cxml%29%28%5B%5Ea-z%5D%7C%24%29/i%29%29%20merit%20%3D%20merit%20-%2040%3B%0Aif%28merit%20%3E%200%29%20outLinks.push%28merit%20+%20lba%20+%20lnk%29%3B%0AServices.console.logStringMessage%28%27merit%3A%27+merit+%27%20lnk-%3E%27+lnk%29%3B%0A%7D%3B%0A%0AlinkArr.push%28fl%29%3B%0Awhile%28linkArr.length%20%3E%20jj%20%26%26%20jj%20%3C%2030%29%20%7B%0A%0Avar%20testPaths%20%3D%20%5B%5D%3B%0AtestPaths%20%3D%20linkArr%5Bjj%5D.split%28/%28%5C.%28%3F%3Aflv%7Cmp4%7Cm3u8%29%29/i%29%3B%0Aif%28testPaths%5BtestPaths.length%20-%201%5D%20%3D%3D%20%27%27%29%20testPaths.pop%28%29%3B%0A%0Afor%28k%20%3D%201%3B%20k%20%3C%20testPaths.length%3B%20k%20%3D%20k%20+%202%29%20%7B%0A%0Aif%28testPaths%5Bk%20-%201%5D.indexOf%28lba%29%20%3E%20-1%29%20%7B%0Apref%20%3D%20testPaths%5Bk%20-%201%5D%3B%0A%7D%20else%20%7B%0Avar%20testAboutDom%20%3D%20testPaths%5Bk%20-%201%5D.toLowerCase%28%29.split%28/%28https%3F%3A%5C/%5C/%29/%29%3B%20%0Aif%28testAboutDom%5BtestAboutDom.length%20-%201%5D%3D%3D%27%27%29%20testAboutDom.pop%28%29%3B%0Avar%20pTest%20%3D%20testAboutDom%5BtestAboutDom.length%20-%201%5D.split%28/%28%5C%3F%5B%5E%5C%3F%5D*%3F%26%29/%29%3B%0Aif%28pTest.length%3E2%29%7B%0ApTest.pop%28%29%3B%0ApTest.pop%28%29%3B%0A%7D%3B%0AtestAboutDom%5BtestAboutDom.length%20-%201%5D%20%3D%20pTest.join%28%27%27%29%3B%0Apref%20%3D%20testPaths%5Bk%20-%201%5D.substring%28testAboutDom.join%28%27%27%29.lastIndexOf%28%22%26%22%29%20+%201%29%3B%0A%7D%3B%0A%0At2%20%3D%20pref.lastIndexOf%28lbb%29%3B%0Aif%28t2%20%3E%20-1%29%20%7B%0Apref%20%3D%20pref.substring%28t2%20+%203%29%3B%0A%7D%20else%20%7B%0A%0At2%20%3D%20pref.lastIndexOf%28%27%7B%22%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%202%29%3B%0At2%20%3D%20pref.lastIndexOf%28%27%5B%22%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%202%29%3B%0At2%20%3D%20pref.lastIndexOf%28%27%2C%22%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%202%29%3B%0At2%20%3D%20pref.toLowerCase%28%29.lastIndexOf%28%27%22http%3A//%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%201%29%3B%0At2%20%3D%20pref.toLowerCase%28%29.lastIndexOf%28%27%22https%3A//%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%201%29%3B%0At2%20%3D%20pref.toLowerCase%28%29.lastIndexOf%28%27%2Chttp%3A//%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%201%29%3B%0At2%20%3D%20pref.toLowerCase%28%29.lastIndexOf%28%27%2Chttps%3A//%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%201%29%3B%0At2%20%3D%20pref.toLowerCase%28%29.lastIndexOf%28%27%3Bhttp%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%201%29%3B%0At2%20%3D%20pref.toLowerCase%28%29.lastIndexOf%28%27*https%3A//%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%201%29%3B%0At2%20%3D%20pref.toLowerCase%28%29.lastIndexOf%28%27%20or%20%27%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%204%29%3B%0A%0Apref%20%3D%20pref.substring%28pref.split%28%27/%27%29%5B0%5D.toLowerCase%28%29.split%28%27%252f%27%29%5B0%5D.lastIndexOf%28%27%3D%27%29%20+%201%29%3B%0A%0A%7D%0A%0Aif%28pref.length%20%3E%200%29%20%7B%0A%0Aif%28pref.split%28%27%3F%27%29%5B0%5D.toLowerCase%28%29.match%28/%25%5B2-3%5D%5B0-9a-f%5D/%29%29%20%7B%0A%0At2%20%3D%20pref.indexOf%28%27%22%27%29%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%201%29%3B%0Asuff%20%3D%20testPaths%5Bk%20+%201%5D%20%3F%20testPaths%5Bk%20+%201%5D.split%28%27%26%27%29%5B0%5D.split%28%27%22%27%29%5B0%5D.split%28%27%3B%27%29%5B0%5D.split%28/%2Chttp/i%29%5B0%5D%20%3A%20%27%27%3B%0Aif%28%28suff%20%21%3D%20testPaths%5Bk%20+%201%5D%29%20%7C%7C%20%28testPaths.length%20%3C%20k%20+%203%29%29%20%7B%0Aif%28testPaths.length%20%3E%20k%20+%201%29%20%7B%0AtestPaths%5Bk%20+%201%5D%20%3D%20%28%28pref%20%3D%3D%20testPaths%5Bk%20-%201%5D%29%20%3F%20%27%27%20%3A%20%27%26%27%29%20+%20testPaths%5Bk%20+%201%5D.substr%28suff.length%29%0A%7D%3B%0At2%20%3D%20pref.lastIndexOf%28lba%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%203%29%0AlinkArr.push%28decodeURL%28pref%20+%20testPaths%5Bk%5D%20+%20suff%29%29%3B%0A%0A%7D%20else%20%7B%0AtestPaths%5Bk%20+%201%5D%20%3D%20%28pref%20%3D%3D%20testPaths%5Bk%20-%201%5D%20%3F%20%27%27%20%3A%20lbb%29%20+%20pref%20+%20testPaths%5Bk%5D%20+%20suff%0A%7D%0A%7D%20else%20%7B%0Asuff%20%3D%20testPaths%5Bk%20+%201%5D%20%3F%20testPaths%5Bk%20+%201%5D.split%28%27%3B%27%29%5B0%5D.split%28%27%22%5D%27%29%5B0%5D.split%28%27%22%7D%27%29%5B0%5D.split%28%27%22%2C%27%29%5B0%5D.split%28/%2Chttps%3F%3A%5C/%5C//i%29%5B0%5D.split%28%27*https%3A//%27%29%5B0%5D.split%28%27%20or%20%27%29%5B0%5D%20%3A%20%27%27%3B%0At2%20%3D%20suff.indexOf%28%27%26%27%29%3B%0Aif%28%28t2%20%3E%20-1%29%20%26%26%20%28pref%20%21%3D%20testPaths%5Bk%20-%201%5D%29%29%20%7B%0Aif%28t2%20%3D%3D%200%29%20suff%20%3D%20%27%27%3B%0Aif%28suff.charAt%280%29%20%21%3D%20%27%3F%27%29%20suff%20%3D%20suff.split%28/%28%26%5B%5E%26%5D+%3Dhttps%3F%3A%5C/%5C/%29/i%29%5B0%5D%3B%0A%7D%3B%0Aif%28%28suff%20%21%3D%20testPaths%5Bk%20+%201%5D%29%20%7C%7C%20%28testPaths.length%20%3C%20k%20+%203%29%29%20%7B%0Aif%28testPaths.length%20%3E%20k%20+%201%29%20%7B%0AtestPaths%5Bk%20+%201%5D%20%3D%20%28%28pref%20%3D%3D%20testPaths%5Bk%20-%201%5D%29%20%3F%20%27%27%20%3A%20%27%26%27%29%20+%20testPaths%5Bk%20+%201%5D.substr%28suff.length%29%0A%7D%3B%0At2%20%3D%20pref.lastIndexOf%28lba%29%3B%0Aif%28t2%20%3E%20-1%29%20pref%20%3D%20pref.substring%28t2%20+%203%29%3B%0ApushWithMerit%28pref%20+%20testPaths%5Bk%5D%20+%20suff%29%3B%0A%0A%7D%20else%20%7B%0AtestPaths%5Bk%20+%201%5D%20%3D%20lba%20+%20%28pref%20%3D%3D%20testPaths%5Bk%20-%201%5D%20%3F%20%27%27%20%3A%20lbb%29%20+%20pref%20+%20testPaths%5Bk%5D%20+%20suff%0A%7D%0A%7D%0A%7D%0A%7D%3B%0Ajj%20%3D%20jj%20+%201%3B%0A%7D%3B%0A%0Aif%28outLinks.length%20%3D%3D%200%29%20return%20%27%27%3B%0Afunction%20srt%28a%2C%20b%29%20%7B%0Aa%20%3D%20parseInt%28a.substr%280%2C%20a.indexOf%28lba%29%29%2C%2010%29%3B%0Ab%20%3D%20parseInt%28b.substr%280%2C%20b.indexOf%28lba%29%29%2C%2010%29%3B%0Aif%28a%20%3C%20b%29%20return%201%3B%0Aif%28a%20%3E%20b%29%20return%20-1%3B%0Areturn%200%0A%7D%3B%0AoutLinks.sort%28srt%29%3B%0AoutLinks%5B0%5D%20%3D%20outLinks%5B0%5D.substr%28outLinks%5B0%5D.indexOf%28lba%29%20+%203%29%0Aif%28outLinks%5B0%5D.indexOf%28%27_hq.mp4/%3Ftime%3D%27%29%20%3E%200%29%20outLinks%5B0%5D%20%3D%20outLinks%5B0%5D.replace%28/%26/g%2C%20%27%26amp%3B%27%29%3B%0Areturn%20outLinks%5B0%5D%3B%0A%7D%3B%0Aol%20%3D%20videoLinkExtract%28flashvars%29%3B%0Aif%28%21ol%29%20return%20%27%27%3B%0A//%20%20%20%20ol%20%3D%20ol.replace%28/%5E%3A%3F%5C/%5C//%2C%20curLocation.protocol%20+%20%22//%22%29%3B%0A//%20%20%20%20return%20restPath%28ol%2C%20src%29%3B%0Areturn%20restProtHost%28ol%2C%20curLocation%29%3B%0A%7D%3B%0A%0A%0Avar%20menu%20%3D%20self.appendChild%28document.createXULElement%28%22menupopup%22%29%29%3B%0Aself.image%20%3D%20%22moz-icon%3A//file%3A//%22%20+%20path%3B%0Avar%20playerName%20%3D%20path.split%28%22%5C%5C%22%29.pop%28%29.replace%28%22.exe%22%2C%22%22%29%3B%0Aself.label%20%3D%20%22%u041E%u0442%u043A%u0440%u044B%u0442%u044C%20%u0432%u0438%u0434%u0435%u043E%20%u0432%20%22%20+sysPlayerName%3B%0AsetTimeout%28%28%29%20%3D%3E%20%7B%0AMenu_n_TooltipTxts.forEach%28%28m%29%20%3D%3E%20%7B%0Aif%28%22separator%22%20in%20m%29%20%7B%0Amenu.appendChild%28document.createXULElement%28%22menuseparator%22%29%29%3B%0Areturn%0A%7D%3B%0Avar%20mItem%20%3D%20document.createXULElement%28%22menuitem%22%29%3B%0AmItem.setAttribute%28%22label%22%2C%20m.label%29%3B%0A%0Aif%28%22radio%22%20in%20m%29%20%7B%0AmItem.setAttribute%28%22type%22%2C%20%22radio%22%29%3B%0AmItem.setAttribute%28%27checked%27%2C%20cbu.getPrefs%28%22CB.video%22%29%20%3D%3D%20m.value%29%3B%0Aif%28cbu.getPrefs%28%22CB.video%22%29%20%3D%3D%20m.value%29%20%7B%0Aself.tooltipText%20%3D%20m.tooltipTxt%3B%0A%7D%0AmItem.onclick%20%3D%20%28%29%20%3D%3E%20%7B%0Acbu.setPrefs%28%22CB.video%22%2C%20m.value%29%3B%0Atmp%20%3D%20%28self.image%20%3D%3D%20imgFlashToPlayer%20%7C%7C%20self.image%20%3D%3D%20imgFlashMinimize%20%7C%7C%20%20self.image%20%3D%3D%20imgFlashMaximize%29%3B%0Aif%28m.value.substring%280%2C9%29%3D%3D%27videotopl%27%29%7B%0Aself.image%20%3D%20tmp%20%3F%20imgFlashToPlayer%20%3A%20imgHTML5ToPlayer%3B%0A%7D%20else%20if%28m.value%3D%3D%27videominimize%27%29%20%7B%0Aself.image%20%3D%20tmp%20%3F%20imgFlashMinimize%20%3A%20imgHTML5Minimize%3B%0A%7D%20else%20self.image%20%3D%20tmp%20%3F%20imgFlashMaximize%20%3A%20imgHTML5Maximize%3B%0Aself.tooltipText%20%3D%20m.tooltipTxt%3B%0A%7D%3B%0A%7D%0Aif%28%22checkbox%22%20in%20m%29%20%7B%0AmItem.setAttribute%28%27type%27%2C%20%27checkbox%27%29%3B%0AmItem.setAttribute%28%27checked%27%2C%20%28self.image%20%3D%3D%20imgFlashToPlayer%20%7C%7C%20self.image%20%3D%3D%20imgFlashMinimize%20%7C%7C%20%20self.image%20%3D%3D%20imgFlashMaximize%20%29%29%3B%0AmItem.onclick%20%3D%20function%28e%29%20%7B%0Ae.stopPropagation%28%29%3B%0Ae.preventDefault%28%29%3B%0Aif%28e.button%20%3D%3D%200%29%20toggleFlash%28%29%3B%0A%7D%0A%7D%0Amenu.appendChild%28mItem%29%3B%0A%7D%29%3B%0Amenu.onclick%20%3D%20function%28e%29%20%7B%0Ae.stopPropagation%28%29%3B%0Aif%28e.button%20%3E%200%29%20e.preventDefault%28%29%3B%0A%7D%3B%0A%7D%2C%20100%29%3B%0A%0Avar%20contextMenu%20%3D%20document.getElementById%28%22contentAreaContextMenu%22%29%3B%0Avar%20menuitem%20%3D%20contextMenu.insertBefore%28document.createXULElement%28%22menuitem%22%29%2C%20document.getElementById%28%22context-savelink%22%29%29%3B%0Amenuitem.setAttribute%28%22label%22%2C%20%22%u041E%u0442%u043A%u0440%u044B%u0442%u044C%20%u0432%20%22%20+sysPlayerName%29%3B%20%20%20%20%20%20%0Amenuitem.setAttribute%28%22class%22%2C%20%22menuitem-iconic%22%29%3B%0Amenuitem.setAttribute%28%22image%22%2C%20%22moz-icon%3A//file%3A//%22%20+%20path%29%3B%20%0Amenuitem.onclick%20%3D%20%28%29%20%3D%3E%20play%28gContextMenu.linkURL%20%7C%7C%20gContextMenu.mediaURL%29%3B%0AaddEventListener%28%22popupshowing%22%2C%20%28%29%3D%3E%20menuitem.hidden%20%3D%20%21gContextMenu.onLink%20%26%26%20%21gContextMenu.onVideo%20%26%26%20%21gContextMenu.onPlainTextLink%2C%20false%2C%20contextMenu%29%3B%0AaddDestructor%28%28%29%3D%3E%20menuitem.remove%28%29%20%29%3B%0A%0Aonclick%20%3D%20%28%29%20%3D%3E%20%7B%0Ae.preventDefault%28%29%3B%0Avar%20vurl%20%3D%20gContextMenu.mediaURL%2C%20videoelem%20%3D%20gContextMenu.target%3B%0Aif%28videoelem%20%26%26%20videoelem.nodeName.toLowerCase%28%29%20%3D%3D%20%27video%27%29%20%7B%0Aif%28content.location.hostname.indexOf%28%27youtu%27%29%20%21%3D%20-1%20%26%26%20%28tmp%20%3D%20content.location.toString%28%29.match%28YoutubeID%29%29%20%26%26%20tmp%5B1%5D.length%20%3D%3D%2011%29%20%7B%0Aplay%28vurl%29%3B%0AvideoMovedbox%20%3D%20content.document.createElement%28%27videoMoved%27%29%3B%0AvideoMovedbox.innerHTML%20%3D%20innerA%20+%20innerB%20+%20%27top%3A-15px%21important%3B%22%3E%3Cb%3E%27%20+%20videoMoved%20+%20%27%3C/b%3E%3C/div%3E%27%3B%0AloadURI%28stopPl%29%3B%0Acontent.document.getElementById%28%27eow-title%27%29.appendChild%28videoMovedbox%29%3B%0Areturn%3B%0A%7D%3B%0A%0Aif%28content.location.hostname%20%3D%3D%20%27www.youtube.com%27%29%20%7B%0Avideoelem.parentNode.parentNode.appendChild%28videoMovedbox%29%3B%0A%7D%20else%20%7B%0Avar%20inFrameHref%20%3D%20inFrameWin.location.href%2C%20found%20%3D%20false%3B%0Aif%28inFrameWin.location.hostname%20%3D%3D%20%27www.youtube.com%27%20%26%26%20%28tmp%20%3D%20inFrameHref.match%28YoutubeID%29%29%20%26%26%20tmp%5B1%5D.length%20%3D%3D%2011%29%7B//%u0438%20%u0437%u043D%u0430%u0447%u0438%u0442%20%u0432%u043E%20%u0444%u0440%u0435%u0439%u043C%u0435%0Aelem%20%3D%20inFrameWin.parent.document.getElementsByTagName%28%27iframe%27%29%3B%0Aif%28elem.length%20%3E%200%29%20%7B%0Afor%28i%20%3D%200%3B%20i%20%3C%20elem.length%3B%20i++%29%20%7B%0Aif%28elem%5Bi%5D.contentWindow%20%3D%3D%20inFrameWin%29%20%7B%0Aelem%5Bi%5D.outerHTML%20%3D%20ytIMGouter%28tmp%5B1%5D%29%3B%0Afound%20%3D%20true%3B%0Abreak%3B%0A%7D%3B%0A%7D%3B%0A%7D%3B%0Aif%28%21found%29inFrameWin.document.body.innerHTML%20%3D%20ytIMGouter%28tmp%5B1%5D%29%3B%0Areturn%3B%0A%7D%3B%0Avideoelem.parentNode.appendChild%28videoMovedbox%29%3B%0A%7D%3B%0Avideoelem.src%20%3D%20%27%27%3B%0Atry%20%7B%0Avideoelem.load%28%29%0A%7D%20catch%28e%29%20%7B%7D%3B%0A%7D%20else%20play%28vurl%29%3B%0A%7D%3B%0A%0A%0AaddEventListener%28%22popupshowing%22%2C%20%28%29%20%3D%3E%20%7B%0AmItem.hidden%20%3D%20%21gContextMenu.onVideo%20%7C%7C%20%21gContextMenu.mediaURL%3B%0AmItem2.hidden%20%3D%20%21gContextMenu.linkURL%3B%0AmItem3.hidden%20%3D%20framItem.hidden%20%7C%7C%20gContextMenu.target.ownerDocument.location.hostname.indexOf%28%27youtube.com%27%29%20%3D%3D%20-1%3B%0A%7D%2C%20false%2C%20contextMenu%29%3B%0AaddDestructor%28%28%29%20%3D%3E%20%7BmItem.remove%28%29%3BmItem2.remove%28%29%3BmItem3.remove%28%29%7D%29%3B%0A%0A%0Afunction%20play%28link%29%20%7B%0A%0Avar%20file%20%3D%20Services.dirsvc.get%28%27CurProcD%27%2C%20Ci.nsIFile%29%3B%0Avar%20MozExeDir%20%3D%20file.path.split%28%27%5C%5C%27%29.slice%280%2C-1%29.join%28%27%5C%5C%27%29%3B%0Afile.initWithPath%28path%29%3B%0Aif%28%21file.exists%28%29%29%20%7B%0Acustombuttons.alertBox%28%22File%20not%20found%21%22%2C%20MozExeDir%20+%20Path%29%3B%0Areturn%3B%0A%7D%3B%0Avar%20process%20%3D%20Cc%5B%22@mozilla.org/process/util%3B1%22%5D.createInstance%28Ci.nsIProcess%29%3B%0Avar%20args%20%3D%20%5Blink%2C%22/play%22%5D%3B%0Aprocess.init%28%20file%20%29%3B%0Aprocess.run%28%20false%2C%20args%2C%20args.length%20%29%3B%0A%7D%3B%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5B/*CODE*/%5D%5D%3E%3C/code%3E%0A%20%20%3Caccelkey%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/accelkey%3E%0A%20%20%3Chelp%3E%3C%21%5BCDATA%5B%5D%5D%3E%3C/help%3E%0A%20%20%3Cattributes/%3E%0A%3C/custombutton%3E
Отсутствует
Мб не по теме, с кнопками разобрался, но с uc.js никак не получается прикрутить автопопап.
Пробовал "custombuttons.initAutoPopup(self);" думал подхватит, но походу я не понимаю как работает все это.. и он так не подхватывает, в общем не знаю, залил так как тут лимит.
pastebin.com/tDGca4mH
Отсутствует
Dumby
Можно ли две кнопки объединить ? "прокси -без прокси" И "смена языка" -(вторая без иконок можно) Ну, чтобы при использовании прокси - исчез язык
(ps => { var s = "network.proxy.type"; this._handleClick = () => ps.setIntPref(s, ps.getIntPref(s, 2) ? 0 : 2); var toggleImage = val => { this.icon.src = (val = ps.getIntPref(s, 2)) ? this.image : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAEBklEQVR42pWTe0xbVRzHf+f23t6WtgJjsFJeq5Z2g0WyLIMNYxAhqMRJhwpM/9lwMWqCmVEzfCDRZQZd4qKOwbK5jYRNHlnBGB1uMNoVCJbyWsdL0rVjCHTQwSiv2/vylGR1+8Nk/pJfcs49v/vJ9/c9v4Pgf4Yc5LE88GF+8DvxdvXBd/RgkftS7ssiQYSurjE+QkoIAggIRBEQIgB4HsRAMSKBYxmRJqknOIYdMFvMw4+Ail57vejnxoYTeBkBKytrIJOJQBCBI3G9yu8HwGhgecT4VkRaE0kNOhzd7xQfLOu22yxBUGFBwXt1tbWVYw1t4JtfhDB1JEhkUqBoCiRSClcRIHAcFijA/NQsxGzZDM7F2fGS8k8//rOz65cgKC/PuL/5/IXqjhN19IpvlVfrtQQdGgIKlRLIEDogS+RYFgLtepwTXPSTcZRrabb/w2NHSu2d3VeCoL1G435TfX1Ve/lp2cKMV4xN1iOVOgKUG8KAUtLrPvF+HlisavovJxe3TUe617x9h745UtpjsV79F5RnLDY1mSqbD3wpmxpyibFbdEip2QiKUBVQWBEicWuCCDxODwYl5+wmZ0OE/pKKLz7pae/4Iwgy7s0vbjJdqqx/9SOZ2z4qRidqkSIifN0jkpYCSDCI54DDeXfcxaUf2EMux6t6SyrKS3vaulof9ajJVHU+823ZeMcNPgp7JAvH/pAkkpASCIwBu7oGfoaBuUkPm/3BGxSXHGUvq/rusLWl/VoQlI8VXWpsqK7JeZcaswzAhvgYoFQ0UJQUJBQJgsgCw+CJCIsGpFBxKbnPkXfYhdu1zY1HW8y1p4OgNwv3Haqtu3jcY+3D13sP5NgbJEEg4FESBR7m55ZE5+gSMKqNSJMUI4bIaXTLMQ2dV3vdy6tzP9S0fX58HZSTmZ118kzVOTxsEfd9Pi/Dc/doKa3YFB0VT8vl0v7rd8QbVg+kpBvQtrQ4kOJub3a7oev3URjrn5ywDV3+LPhETlVVZ9BKBdInb/Vcb7uWqY2LP6h7Srvd7yfAdGoYXP2LkG1MhqyCFCCwZ46uW4Kt1UmM9E2B2+0yB0E4aJzMVr3B8NPZs8fSdu3aQ+C2picW4Nv3r8CA9TZkGA2wO9cAkepQmHbfEzpbRtCAdRJ5PWsTD4MUOJdfyMre/uPJyn2Jer0O7xdtrQ7q+8Otz8yMswlpLyaANikKdEmxsLS0zFkvDxMjtruEZ8Y7+DDov4LQQmapYdMrR1Of14FhhxqSdmpgbuq++FuNAw33/S04vZbKxwFBOP51R0LRhZ2pqYlZ+SnwdIYahrqm4FyFBQZ7b9oHxa+LHwsUCCWRUJi2+a2y9GcztJpYDbJ12v1m86+9Lrj4FT62/AO9772juU6/nAAAAABJRU5ErkJggg=="; this.tooltipText = val ? 'Автопрокси' : 'Без прокси'; } toggleImage(); ps.addObserver(s, toggleImage, false); addDestructor(() => ps.removeObserver(s, toggleImage)); })(Services.prefs); this.oncontextmenu =e=> { e.button && !e.ctrlKey && e.preventDefault() };
var s = "intl.accept_languages";
Отредактировано solombala (29-01-2020 12:18:50)
Отсутствует
Парни, просьба сделать кнопку "Показать инструмент Пипетка". Спасибо!
Отсутствует
Парни, просьба сделать кнопку "Показать инструмент Пипетка". Спасибо!
А [CB]Extensions Developer Tools (для разработчиков расширений/кнопок) не устраивает?
Добавлено 29-01-2020 19:19:31
Как же я это одну из самых ожидаемых кнопок прозевал.
Согласен, сорри. Поэтому и получил не совсем то что хотел. Имелось ввиду двойной СКМ на странице - открыть/закрыть FindBar. Добавь закрытие ещё, плиз. А открывает хорошо, спасибо.
Отредактировано voqabuhe (29-01-2020 19:19:31)
Отсутствует
А [CB]Extensions Developer Tools (для разработчиков расширений/кнопок) не устраивает?
Не устраивает.
Отсутствует
залил так как тут лимит
Вот если бы весь расклад залил, то можно
было бы на практике проверить. А так, теоретически,
вроде должно работать, если после
aNode.setAttribute('menupopup','QuickOpen_pop');
добавить
aNode.onmouseover = e => aNode.ownerGlobal.custombuttons.initAutoPopup(aNode) && aNode.onmouseover(e);
Можно ли две кнопки объединить ? "прокси -без прокси" И "смена языка" -(вторая без иконок можно) Ну, чтобы при использовании прокси - исчез язык
Так что ли
this._handleClick = () => { var val = ps.getIntPref(s); ps.setIntPref(s, val ? 0 : 2); ps.setStringPref("intl.accept_languages", val ? "ru-RU, ru, en-US, en" : ""); }
Пипетка
this._handleClick = () => { var obj = ChromeUtils.import("resource://devtools/shared/Loader.jsm") .require("devtools/client/menus").menuitems .find(menuitem => menuitem.id == "menu_eyedropper"); (this._handleClick = obj.oncommand.bind(null, {target: this}))(); }
Добавь закрытие ещё, плиз.
Раскомментируй закомментированое.
Отсутствует
Раскомментируй закомментированое.
А, не заметил. Спасибо.
Добавлено 29-01-2020 22:09:22
Dumby
Слушай, вот ещё очень полезная кнопка, которую многие ищут, поправь плиз.
Cредней кнопкой мыши вставить текст из буфера обмена в текстовые поля с заменой выделенного текста
Отредактировано voqabuhe (29-01-2020 22:09:22)
Отсутствует
Dumby, спасибо сразу заработал, а так это весь расклад, в самом коде пока пытаюсь разобраться но без знаний трудно.
Отсутствует
Dumby
Так что ли
А как иконку сменить на это ps.setIntPref(s, val ? 0 : 2);
Не парься , код тоже того..., а, жаль...Видать и у проффи бывают свои Ватерлоо...
Отредактировано solombala (30-01-2020 10:51:14)
Отсутствует
rubel
- document.getElementById("context-navigation").appendChild(closeMenuitem, document.getElementById("context-navigation"));
+ document.getElementById("context-navigation").insertBefore(closeMenuitem, document.getElementById("context-navigation").firstChild);
voqabuhe как вариант
// Добавыть в контекстное меню страницы пункт "Close Tab / Home page" ............................................................................................... (function () { if ( document.getElementById("context-close-tab") ) return; var closeMenuitem = document.createXULElement("menuitem"); closeMenuitem.setAttribute("id", "context-close-tab"); closeMenuitem.setAttribute("label", "Закрыть вкладку"); closeMenuitem.setAttribute("tooltiptext", "ЛКМ: Закрыть вкладку" + "\n" + "ПКМ: Домашняя страница"); closeMenuitem.setAttribute("class", "menuitem-iconic"); closeMenuitem.setAttribute("image", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMjHxIGmVAAABIElEQVRYR+2XQWqEQBBFO8kii+RYWc/OCwSSheDOMGpE+uamOvYfHKZsq8oiZDEfPgVK9XuICIZ7/m3atn2hMTdN87xc0aeqqqfzOH2EEB/zJVkARy0SCU7jcoZYoq7jK43V4lKNxC0c3ZHYgqMSiW04WpZgFq5bktiHh7kbpi+afPLh7OK6nIQEnpqf8nYsEm5wRCPhDkekEpKq4YiHhBmOHJE4DEcsEm5wRCPhDk+Rvu2pWdYvGjjqJmGBo4cljsBRs4QHHFVLSOHpbc+Hs/fXFUto4DR/4yZhgSMuEt0Y32iwi2jpIyOR6L7jJ83tdEN8p8EuS75wAokHajmchASOFCT24chaQgNHGAk5HOn7eLLAkSSx/JgY4Pf8TUL4Af7puZVCy+zgAAAAAElFTkSuQmCC"); closeMenuitem.setAttribute("oncommand", "gBrowser.removeTab(gBrowser.selectedTab, { animate: true });"); closeMenuitem.setAttribute("oncontextmenu", "if (event.target == this && !event.ctrlKey && !event.shiftKey) {event.preventDefault(); event.stopPropagation(); gBrowser. loadURI('about:newtab', {triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()}); hidePopup()}"); // в конце строки document.getElementById("context-navigation").appendChild(closeMenuitem, document.getElementById("context-navigation")); // в начале строки //document.getElementById("context-navigation").insertBefore(closeMenuitem, document.getElementById("context-navigation").firstChild) })();
Добавлено 30-01-2020 09:29:55
Dumby что твой код про тултип не хочет у меня работать, и я не понял про упростить в каком коде
Отредактировано Andrey_Krropotkin (30-01-2020 09:29:55)
Отсутствует
Andrey_Krropotkin
Эндрю может ты поляну просечешь ?
Кнопка "Прокси -авто -нет"
(ps => { var s = "network.proxy.type"; this._handleClick = () => ps.setIntPref(s, ps.getIntPref(s, 2) ? 0 : 2); var toggleImage = val => { this.icon.src = (val = ps.getIntPref(s, 2)) ? this.image : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAEBklEQVR42pWTe0xbVRzHf+f23t6WtgJjsFJeq5Z2g0WyLIMNYxAhqMRJhwpM/9lwMWqCmVEzfCDRZQZd4qKOwbK5jYRNHlnBGB1uMNoVCJbyWsdL0rVjCHTQwSiv2/vylGR1+8Nk/pJfcs49v/vJ9/c9v4Pgf4Yc5LE88GF+8DvxdvXBd/RgkftS7ssiQYSurjE+QkoIAggIRBEQIgB4HsRAMSKBYxmRJqknOIYdMFvMw4+Ail57vejnxoYTeBkBKytrIJOJQBCBI3G9yu8HwGhgecT4VkRaE0kNOhzd7xQfLOu22yxBUGFBwXt1tbWVYw1t4JtfhDB1JEhkUqBoCiRSClcRIHAcFijA/NQsxGzZDM7F2fGS8k8//rOz65cgKC/PuL/5/IXqjhN19IpvlVfrtQQdGgIKlRLIEDogS+RYFgLtepwTXPSTcZRrabb/w2NHSu2d3VeCoL1G435TfX1Ve/lp2cKMV4xN1iOVOgKUG8KAUtLrPvF+HlisavovJxe3TUe617x9h745UtpjsV79F5RnLDY1mSqbD3wpmxpyibFbdEip2QiKUBVQWBEicWuCCDxODwYl5+wmZ0OE/pKKLz7pae/4Iwgy7s0vbjJdqqx/9SOZ2z4qRidqkSIifN0jkpYCSDCI54DDeXfcxaUf2EMux6t6SyrKS3vaulof9ajJVHU+823ZeMcNPgp7JAvH/pAkkpASCIwBu7oGfoaBuUkPm/3BGxSXHGUvq/rusLWl/VoQlI8VXWpsqK7JeZcaswzAhvgYoFQ0UJQUJBQJgsgCw+CJCIsGpFBxKbnPkXfYhdu1zY1HW8y1p4OgNwv3Haqtu3jcY+3D13sP5NgbJEEg4FESBR7m55ZE5+gSMKqNSJMUI4bIaXTLMQ2dV3vdy6tzP9S0fX58HZSTmZ118kzVOTxsEfd9Pi/Dc/doKa3YFB0VT8vl0v7rd8QbVg+kpBvQtrQ4kOJub3a7oev3URjrn5ywDV3+LPhETlVVZ9BKBdInb/Vcb7uWqY2LP6h7Srvd7yfAdGoYXP2LkG1MhqyCFCCwZ46uW4Kt1UmM9E2B2+0yB0E4aJzMVr3B8NPZs8fSdu3aQ+C2picW4Nv3r8CA9TZkGA2wO9cAkepQmHbfEzpbRtCAdRJ5PWsTD4MUOJdfyMre/uPJyn2Jer0O7xdtrQ7q+8Otz8yMswlpLyaANikKdEmxsLS0zFkvDxMjtruEZ8Y7+DDov4LQQmapYdMrR1Of14FhhxqSdmpgbuq++FuNAw33/S04vZbKxwFBOP51R0LRhZ2pqYlZ+SnwdIYahrqm4FyFBQZ7b9oHxa+LHwsUCCWRUJi2+a2y9GcztJpYDbJ12v1m86+9Lrj4FT62/AO9772juU6/nAAAAABJRU5ErkJggg=="; this.tooltipText = val ? 'Автопрокси' : 'Без прокси'; } toggleImage(); ps.addObserver(s, toggleImage, false); addDestructor(() => ps.removeObserver(s, toggleImage)); })(Services.prefs); this.oncontextmenu =e=> { e.button && !e.ctrlKey && e.preventDefault() };
Отсутствует
Dumby
Спасибо за кнопку Пипетка.
Ничего у меня не получается,там полно всяких знаков и куда конкретно вставлять я запутался. Лучше дайте, пожалуйста, готовый код.
Держи
// Добавить в контекстное меню страницы пункт "Close Tab / Home page" ............................................................................................... (function () { if ( document.getElementById("context-close-tab") ) return; var closeMenuitem = document.createXULElement("menuitem"); closeMenuitem.setAttribute("id", "context-close-tab"); closeMenuitem.setAttribute("label", "Закрыть вкладку"); closeMenuitem.setAttribute("tooltiptext", "ЛКМ: Закрыть вкладку" + "\n" + "ПКМ: Домашняя страница"); closeMenuitem.setAttribute("class", "menuitem-iconic"); closeMenuitem.setAttribute("image", "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAZdEVYdFNvZnR3YXJlAHBhaW50Lm5ldCA0LjAuMjHxIGmVAAABIElEQVRYR+2XQWqEQBBFO8kii+RYWc/OCwSSheDOMGpE+uamOvYfHKZsq8oiZDEfPgVK9XuICIZ7/m3atn2hMTdN87xc0aeqqqfzOH2EEB/zJVkARy0SCU7jcoZYoq7jK43V4lKNxC0c3ZHYgqMSiW04WpZgFq5bktiHh7kbpi+afPLh7OK6nIQEnpqf8nYsEm5wRCPhDkekEpKq4YiHhBmOHJE4DEcsEm5wRCPhDk+Rvu2pWdYvGjjqJmGBo4cljsBRs4QHHFVLSOHpbc+Hs/fXFUto4DR/4yZhgSMuEt0Y32iwi2jpIyOR6L7jJ83tdEN8p8EuS75wAokHajmchASOFCT24chaQgNHGAk5HOn7eLLAkSSx/JgY4Pf8TUL4Af7puZVCy+zgAAAAAElFTkSuQmCC"); closeMenuitem.setAttribute("oncommand", "gBrowser.removeTab(gBrowser.selectedTab, { animate: true });"); closeMenuitem.setAttribute("oncontextmenu", "if (event.target == this && !event.ctrlKey && !event.shiftKey) {event.preventDefault(); event.stopPropagation(); gBrowser. loadURI('about:newtab', {triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()}); hidePopup()}"); // в конце строки // document.getElementById("context-navigation").appendChild(closeMenuitem, document.getElementById("context-navigation")); // в начале строки document.getElementById("context-navigation").insertBefore(closeMenuitem, document.getElementById("context-navigation").firstChild) })();
Отредактировано shadow_user (30-01-2020 16:26:14)
Отсутствует
rubel "-" значит удалить, "+" значит добавить, т.е. заменить одно на другое (я не знаю какой у тебя сейчас код, поэтому как я тебе его приведу полностью, меня то что в моем посту)
solombala ну я так понял, что привел Dumby, но язык почему -то не перевлючается
var s = "network.proxy.type"; this._handleClick = () => { var val = ps.getIntPref(s); ps.setIntPref(s, val ? 0 : 2); ps.setStringPref("intl.accept_languages", val ? "ru-RU, ru, en-US, en" : ""); } var toggleImage = val => { this.icon.src = (val = ps.getIntPref(s, 2)) ? this.image : "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAEBklEQVR42pWTe0xbVRzHf+f23t6WtgJjsFJeq5Z2g0WyLIMNYxAhqMRJhwpM/9lwMWqCmVEzfCDRZQZd4qKOwbK5jYRNHlnBGB1uMNoVCJbyWsdL0rVjCHTQwSiv2/vylGR1+8Nk/pJfcs49v/vJ9/c9v4Pgf4Yc5LE88GF+8DvxdvXBd/RgkftS7ssiQYSurjE+QkoIAggIRBEQIgB4HsRAMSKBYxmRJqknOIYdMFvMw4+Ail57vejnxoYTeBkBKytrIJOJQBCBI3G9yu8HwGhgecT4VkRaE0kNOhzd7xQfLOu22yxBUGFBwXt1tbWVYw1t4JtfhDB1JEhkUqBoCiRSClcRIHAcFijA/NQsxGzZDM7F2fGS8k8//rOz65cgKC/PuL/5/IXqjhN19IpvlVfrtQQdGgIKlRLIEDogS+RYFgLtepwTXPSTcZRrabb/w2NHSu2d3VeCoL1G435TfX1Ve/lp2cKMV4xN1iOVOgKUG8KAUtLrPvF+HlisavovJxe3TUe617x9h745UtpjsV79F5RnLDY1mSqbD3wpmxpyibFbdEip2QiKUBVQWBEicWuCCDxODwYl5+wmZ0OE/pKKLz7pae/4Iwgy7s0vbjJdqqx/9SOZ2z4qRidqkSIifN0jkpYCSDCI54DDeXfcxaUf2EMux6t6SyrKS3vaulof9ajJVHU+823ZeMcNPgp7JAvH/pAkkpASCIwBu7oGfoaBuUkPm/3BGxSXHGUvq/rusLWl/VoQlI8VXWpsqK7JeZcaswzAhvgYoFQ0UJQUJBQJgsgCw+CJCIsGpFBxKbnPkXfYhdu1zY1HW8y1p4OgNwv3Haqtu3jcY+3D13sP5NgbJEEg4FESBR7m55ZE5+gSMKqNSJMUI4bIaXTLMQ2dV3vdy6tzP9S0fX58HZSTmZ118kzVOTxsEfd9Pi/Dc/doKa3YFB0VT8vl0v7rd8QbVg+kpBvQtrQ4kOJub3a7oev3URjrn5ywDV3+LPhETlVVZ9BKBdInb/Vcb7uWqY2LP6h7Srvd7yfAdGoYXP2LkG1MhqyCFCCwZ46uW4Kt1UmM9E2B2+0yB0E4aJzMVr3B8NPZs8fSdu3aQ+C2picW4Nv3r8CA9TZkGA2wO9cAkepQmHbfEzpbRtCAdRJ5PWsTD4MUOJdfyMre/uPJyn2Jer0O7xdtrQ7q+8Otz8yMswlpLyaANikKdEmxsLS0zFkvDxMjtruEZ8Y7+DDov4LQQmapYdMrR1Of14FhhxqSdmpgbuq++FuNAw33/S04vZbKxwFBOP51R0LRhZ2pqYlZ+SnwdIYahrqm4FyFBQZ7b9oHxa+LHwsUCCWRUJi2+a2y9GcztJpYDbJ12v1m86+9Lrj4FT62/AO9772juU6/nAAAAABJRU5ErkJggg=="; this.tooltipText = val ? 'Автопрокси' : 'Без прокси'; } toggleImage(); ps.addObserver(s, toggleImage, false); addDestructor(() => ps.removeObserver(s, toggleImage)); })(Services.prefs); this.oncontextmenu =e=> { e.button && !e.ctrlKey && e.preventDefault() };
Отсутствует
Кнопка "Прокси -авто -нет"
Как туда же это var s = "intl.accept_languages"
Чтобы язык сменить одновременно...
Под:
положи:
Отсутствует
Держи
Спасибо. Здесь совсем другой код а не такой как здесь.
Вот ещё бы починить кнопку feed-button в адресной стоке. Она прекрасно у меня работает в Firefox 55.
Вот её код
/*Initialization Code*/ // feed-button в адресной стоке ........................................ var bar = document.getElementById("nav-bar"); bar.currentSet = "feed-button," + bar.getAttribute("currentset"); bar.setAttribute("currentset",bar.currentSet); document.persist(bar.id,"currentset"); document.getElementById("urlbar-icons").insertBefore(document.getElementById("feed-button"),document.getElementById("star-button")); //стиль....... (function(css) { var pi = document.createProcessingInstruction( 'xml-stylesheet', 'type="text/css" href="data:text/css;utf-8,' + encodeURIComponent(css) + '"' ); return document.insertBefore(pi, document.documentElement); } )('\ @namespace url(http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul);\n\ #feed-button { height: 24px !important; min-width: 0 !important; margin: 0 !important; padding: 0 !important;\n\ -moz-appearance: none !important; background: none !important; border: none !important; box-shadow: none !important; }\n\ #feed-button > image { display: -moz-box !important; margin: 0 !important; }\n\ #feed-button > label, #feed-button[disabled] { display: none !important; }\n\ ');
Отсутствует