>Форум Mozilla Россия http://forum.mozilla-russia.org/index.php >Сustom Buttons http://forum.mozilla-russia.org/viewforum.php?id=34 >[CB]Check for Addons Updates http://forum.mozilla-russia.org/viewtopic.php?id=57958 |
Infocatcher > 04-02-2013 01:27:44 |
Check for Addons Updates 0.1.5 (2014-10-13) Установить: Выделить код Код: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%3ECheck%20for%20Addons%20Updates%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABEVBMVEUAAAARdxEcTL9YluZYmelgmeZOkOU4f+BOk+hShdpVh9szmTNHd9MeWckdWMkRdxEfhR9Vu1UdVcYRdxGI7ohHrUcdXMwdWMkcUcMcTsFRgthv1G8zmTNVkuVhleJflOJckeFclONEh+JJkLpNiuFKi+Mpb9g8f95knOdcj99ajd9Lg9xkmeVem+kyiIxonudYidscTL9Kf9g2cdQiY9AjbqdgmeZbleVZmOhCl5Y8ctMmYs4/g+EdZqBmm+VTlOc3a89Bgt9XkeNSjeIZX5pHhuAWZ2w5iY43e905iI0rbqkWZmtYj+FTjOAmaKNQj+Qnc3khYJ0jbNchatZXleZgl+Q4dtg2iZYdaG4cWpZZmeovdSBxAAAAEHRSTlMAgH/MoZXKh52fy4Ccv39AzZGpkwAAALNJREFUeF51j8WuAkEQRXsGf9o2Pri7u7s7T///Q2joBbCgkqrknsW5KfB0rP/OR5CudR+B5WS/BVs2Vqm6t+FAy8FBJ/XlHwxD4350xoHH61utg6geORw5iCeS3z8SlSQpw5Ir91IolsomNSil5isAut5oyrLchghCSCEAb713RZlOlRGZfABCrg6MEcJ4jhZ4KVyBql6MbDcqb9G0nUkps5p7DsR8/pcZEfwTwd0I5JPdM/o+FIGIkY8MAAAAAElFTkSuQmCC%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B/*Initialization%20Code*/%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5B//%20http%3A//infocatcher.ucoz.net/js/cb/checkForAddonsUpdates.js%0A//%20https%3A//forum.mozilla-russia.org/viewtopic.php%3Fid%3D57958%0A//%20https%3A//github.com/Infocatcher/Custom_Buttons/tree/master/Check_for_Addons_Updates%0A%0A//%20Check%20for%20Addons%20Updates%20button%20for%20Custom%20Buttons%0A//%20%28code%20for%20%22code%22%20section%29%0A%0A//%20%28c%29%20Infocatcher%202012-2014%0A//%20version%200.1.5%20-%202014-10-13%0A%0A//%20Button%20just%20open%20hidden%20tab%20with%20about%3Aaddons%20and%20trigger%20built-in%20%22Check%20for%20Updates%22%20function.%0A//%20And%20show%20tab%2C%20if%20found%20updates.%0A%0A%28function%28%29%20%7B%0Avar%20btn%20%3D%20this%20instanceof%20XULElement%0A%09%3F%20this%0A%09%3A%20%7B%20//%20Launched%20not%20from%20custom%20button%0A%09%09image%3A%20%22%22%2C%20//%20Base64-encoded%20icon%20%28if%20empty%2C%20will%20be%20used%20%22imgLoading%22%29%0A%09%09label%3A%20%22Check%20for%20Addons%20Updates%22%2C%0A%09%09tooltipText%3A%20%22%22%0A%09%7D%3B%0Aif%28%22_cb_disabled%22%20in%20btn%29%0A%09return%3B%0Abtn._cb_disabled%20%3D%20true%3B%0A%0Aif%28%21%28%22Services%22%20in%20window%29%29%0A%09Components.utils.import%28%22resource%3A//gre/modules/Services.jsm%22%29%3B%0Avar%20app%20%3D%20Services.appinfo.name%3B%0A%0Avar%20ADDONS_URL%20%3D%20%22about%3Aaddons%22%3B%0A%0Avar%20progressIcon%20%3D%20new%20ProgressIcon%28btn%29%3B%0Avar%20image%20%3D%20btn.image%20%7C%7C%20progressIcon.imgLoading%3B%0Avar%20tip%20%3D%20btn.tooltipText%3B%0Abtn.tooltipText%20%3D%20%22Open%20%22%20+%20ADDONS_URL%20+%20%22%u2026%22%3B%0A%0Avar%20tab%2C%20browser%2C%20gBrowser%3B%0Avar%20tbTabInfo%2C%20tbTab%3B%0A%0Avar%20trgWindow%20%3D%20Services.wm.getMostRecentWindow%28%22navigator%3Abrowser%22%29%0A%09%7C%7C%20app%20%3D%3D%20%22Thunderbird%22%20%26%26%20Services.wm.getMostRecentWindow%28%22mail%3A3pane%22%29%0A%09%7C%7C%20window%3B%0Avar%20trgDocument%20%3D%20trgWindow.document%3B%0Avar%20tabmail%20%3D%20trgDocument.getElementById%28%22tabmail%22%29%3B%0A%0Aif%28tabmail%20%26%26%20app%20%3D%3D%20%22Thunderbird%22%29%20%7B%20//%20Note%3A%20SeaMonkey%20doesn%27t%20support%20content%20tabs%20in%20mail%20window%0A%09let%20addonsWin%3B%0A%09let%20receivePong%20%3D%20function%28subject%2C%20topic%2C%20data%29%20%7B%0A%09%09addonsWin%20%3D%20subject%3B%0A%09%7D%3B%0A%09Services.obs.addObserver%28receivePong%2C%20%22EM-pong%22%2C%20false%29%3B%0A%09Services.obs.notifyObservers%28null%2C%20%22EM-ping%22%2C%20%22%22%29%3B%0A%09Services.obs.removeObserver%28receivePong%2C%20%22EM-pong%22%29%3B%0A%09if%28addonsWin%29%20%7B%0A%09%09let%20rootWindow%20%3D%20addonsWin%0A%09%09%09.QueryInterface%28Components.interfaces.nsIInterfaceRequestor%29%0A%09%09%09.getInterface%28Components.interfaces.nsIWebNavigation%29%0A%09%09%09.QueryInterface%28Components.interfaces.nsIDocShellTreeItem%29%0A%09%09%09.rootTreeItem%0A%09%09%09.QueryInterface%28Components.interfaces.nsIInterfaceRequestor%29%0A%09%09%09.getInterface%28Components.interfaces.nsIDOMWindow%29%3B%0A%09%09tabmail%20%3D%20rootWindow.document.getElementById%28%22tabmail%22%29%3B%0A%09%09tbTabInfo%20%3D%20tabmail.getBrowserForDocument%28addonsWin%29%3B%0A%09%09tbTab%20%3D%20tab%20%3D%20tbTabInfo.tabNode%3B%0A%09%09processAddonsTab%28addonsWin%29%3B%0A%09%7D%0A%09else%20%7B%0A%09%09Services.obs.addObserver%28function%20observer%28subject%2C%20topic%2C%20data%29%20%7B%0A%09%09%09Services.obs.removeObserver%28observer%2C%20topic%29%3B%0A%09%09%09if%28subject.document.readyState%20%3D%3D%20%22complete%22%29%0A%09%09%09%09processAddonsTab%28subject%29%3B%0A%09%09%09else%20%7B%0A%09%09%09%09subject.addEventListener%28%22load%22%2C%20function%20onLoad%28e%29%20%7B%0A%09%09%09%09%09subject.removeEventListener%28e.type%2C%20onLoad%2C%20false%29%3B%0A%09%09%09%09%09processAddonsTab%28subject%29%3B%0A%09%09%09%09%7D%2C%20false%29%3B%0A%09%09%09%7D%0A%09%09%7D%2C%20%22EM-loaded%22%2C%20false%29%3B%0A%09%09//%20See%20openAddonsMgr%28%29%20-%3E%20openContentTab%28%29%0A%09%09tbTabInfo%20%3D%20tabmail.openTab%28%22contentTab%22%2C%20%7B%0A%09%09%09contentPage%3A%20ADDONS_URL%2C%0A%09%09%09clickHandler%3A%20%22specialTabs.siteClickHandler%28event%2C%20/addons%5C.mozilla%5C.org/%29%3B%22%2C%0A%09%09%09background%3A%20true%0A%09%09%7D%29%3B%0A%09%09tbTab%20%3D%20tab%20%3D%20tbTabInfo.tabNode%3B%0A%09%09tbTab.collapsed%20%3D%20true%3B%0A%09%09//%20Note%3A%20dontSelectHiddenTab%28%29%20not%20implemented%0A%09%7D%0A%7D%0Aelse%20if%28%22gBrowser%22%20in%20trgWindow%20%26%26%20trgWindow.gBrowser.tabs%29%20%7B%0A%09let%20isPending%20%3D%20false%3B%0A%09let%20ws%20%3D%20Services.wm.getEnumerator%28%22navigator%3Abrowser%22%29%3B%0A%09windowsLoop%3A%0A%09while%28ws.hasMoreElements%28%29%29%20%7B%0A%09%09let%20w%20%3D%20ws.getNext%28%29%3B%0A%09%09let%20tabs%20%3D%20w.gBrowser.tabs%3B%0A%09%09for%28let%20i%20%3D%200%2C%20l%20%3D%20tabs.length%3B%20i%20%3C%20l%3B%20++i%29%20%7B%0A%09%09%09let%20t%20%3D%20tabs%5Bi%5D%3B%0A%09%09%09if%28%0A%09%09%09%09%21t.closing%0A%09%09%09%09%26%26%20t.linkedBrowser%0A%09%09%09%09%26%26%20t.linkedBrowser.currentURI.spec%20%3D%3D%20ADDONS_URL%0A%09%09%09%29%20%7B%0A%09%09%09%09tab%20%3D%20t%3B%0A%09%09%09%09break%20windowsLoop%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%7D%0A%0A%09gBrowser%20%3D%20trgWindow.gBrowser%3B%0A%09if%28%21tab%29%20%7B%0A%09%09tab%20%3D%20gBrowser.addTab%28ADDONS_URL%29%3B%0A%09%09tab.collapsed%20%3D%20true%3B%0A%09%09tab.closing%20%3D%20true%3B%20//%20See%20%22visibleTabs%22%20getter%20in%20chrome%3A//browser/content/tabbrowser.xml%0A%09%09trgWindow.addEventListener%28%22TabSelect%22%2C%20dontSelectHiddenTab%2C%20false%29%3B%0A%09%7D%0A%09else%20if%28%0A%09%09tab.getAttribute%28%22pending%22%29%20%3D%3D%20%22true%22%20//%20Gecko%20%3E%3D%209.0%0A%09%09%7C%7C%20tab.linkedBrowser.contentDocument.readyState%20%3D%3D%20%22uninitialized%22%0A%09%09//%20%7C%7C%20tab.linkedBrowser.__SS_restoreState%20%3D%3D%201%0A%09%29%0A%09%09isPending%20%3D%20true%3B%0A%0A%09browser%20%3D%20tab.linkedBrowser%3B%0A%09if%28isPending%20%7C%7C%20browser.webProgress.isLoadingDocument%29%20%7B%0A%09%09browser.addEventListener%28%22load%22%2C%20processAddonsTab%2C%20true%29%3B%0A%09%09if%28isPending%29%0A%09%09%09browser.reload%28%29%3B%0A%09%7D%0A%09else%20%7B%0A%09%09processAddonsTab%28%29%3B%0A%09%7D%0A%7D%0Aelse%20%7B%0A%09progressIcon.restore%28%29%3B%0A%09btn.tooltipText%20%3D%20tip%3B%0A%09delete%20btn._cb_disabled%3B%0A%09Services.prompt.alert%28window%2C%20btn.label%2C%20%22Error%3A%20Can%27t%20find%20supported%20window%21%22%29%3B%0A%09return%3B%0A%7D%0A%0Afunction%20processAddonsTab%28e%29%20%7B%0A%09var%20doc%3B%0A%09if%28e%20%26%26%20e%20instanceof%20Components.interfaces.nsIDOMWindow%29%20%7B%0A%09%09doc%20%3D%20e.document%3B%0A%09%7D%0A%09else%20if%28e%29%20%7B%0A%09%09doc%20%3D%20e.target%3B%0A%09%09if%28doc.location%20%21%3D%20ADDONS_URL%29%0A%09%09%09return%3B%0A%09%09browser.removeEventListener%28e.type%2C%20processAddonsTab%2C%20true%29%3B%0A%09%7D%0A%09else%20%7B%0A%09%09doc%20%3D%20browser.contentDocument%3B%0A%09%7D%0A%0A%09progressIcon.loading%28%29%3B%0A%09btn.tooltipText%20%3D%20%24%28%22updates-progress%22%29.getAttribute%28%22value%22%29%3B%0A%0A%09var%20origIcon%20%3D%20tab.image%3B%0A%09tab.image%20%3D%20image%3B%0A%0A%09var%20updEnabledPref%20%3D%20%22extensions.update.enabled%22%3B%0A%09var%20updEnabled%20%3D%20Services.prefs.getBoolPref%28updEnabledPref%29%3B%0A%09if%28%21updEnabled%29%0A%09%09Services.prefs.setBoolPref%28updEnabledPref%2C%20true%29%3B%0A%0A%09var%20notFound%20%3D%20%24%28%22updates-noneFound%22%29%3B%0A%09var%20updated%20%3D%20%24%28%22updates-installed%22%29%3B%0A%09//%20Avoid%20getting%20false%20results%20from%20the%20past%20update%20check%20%28may%20not%20be%20required%20for%20%22noneFound%22%29%0A%09notFound.hidden%20%3D%20updated.hidden%20%3D%20true%3B%0A%0A%09%24%28%22cmd_findAllUpdates%22%29.doCommand%28%29%3B%0A%0A%09var%20waitTimer%20%3D%20setInterval%28function%28%29%20%7B%0A%09%09if%28%21doc.defaultView%20%7C%7C%20doc.defaultView.closed%29%20%7B%0A%09%09%09stopWait%28%29%3B%0A%09%09%09notify%28%22Tab%20with%20add-ons%20manager%20was%20closed%21%22%29%3B%0A%09%09%09return%3B%0A%09%09%7D%0A%09%09var%20inProgress%20%3D%20%24%28%22updates-progress%22%29%3B%0A%09%09if%28%21inProgress.hidden%29%0A%09%09%09return%3B%0A%09%09var%20autoUpdate%20%3D%20%24%28%22utils-autoUpdateDefault%22%29%3B%0A%09%09var%20autoUpdateChecked%20%3D%20autoUpdate.getAttribute%28%22checked%22%29%20%3D%3D%20%22true%22%3B%0A%0A%09%09var%20found%20%3D%20%24%28%22updates-manualUpdatesFound-btn%22%29%3B%0A%09%09if%28%0A%09%09%09autoUpdateChecked%0A%09%09%09%09%3F%20notFound.hidden%20%26%26%20updated.hidden%0A%09%09%09%09%3A%20notFound.hidden%20%26%26%20found.hidden%0A%09%09%29%20//%20Too%20early%3F%0A%09%09%09return%3B%0A%0A%09%09stopWait%28%29%3B%0A%09%09if%28%21tbTab%29%0A%09%09%09tab.closing%20%3D%20false%3B%0A%09%09function%20removeTab%28%29%20%7B%0A%09%09%09if%28%21tab.collapsed%29%0A%09%09%09%09return%3B%0A%09%09%09if%28tbTab%29%0A%09%09%09%09tabmail.closeTab%28tbTabInfo%2C%20true%20/*aNoUndo*/%29%3B%0A%09%09%09else%20%7B%0A%09%09%09%09gBrowser.removeTab%28tab%29%3B%0A%09%09%09%09%28function%20forgetClosedTab%28isSecondTry%29%20%7B%0A%09%09%09%09%09var%20ss%20%3D%20%28%0A%09%09%09%09%09%09Components.classes%5B%22@mozilla.org/browser/sessionstore%3B1%22%5D%0A%09%09%09%09%09%09%7C%7C%20Components.classes%5B%22@mozilla.org/suite/sessionstore%3B1%22%5D%0A%09%09%09%09%09%29.getService%28Components.interfaces.nsISessionStore%29%3B%0A%09%09%09%09%09if%28%21%28%22forgetClosedTab%22%20in%20ss%29%29%0A%09%09%09%09%09%09return%3B%0A%09%09%09%09%09var%20closedTabs%20%3D%20JSON.parse%28ss.getClosedTabData%28window%29%29%3B%0A%09%09%09%09%09for%28let%20i%20%3D%200%2C%20l%20%3D%20closedTabs.length%3B%20i%20%3C%20l%3B%20++i%29%20%7B%0A%09%09%09%09%09%09let%20closedTab%20%3D%20closedTabs%5Bi%5D%3B%0A%09%09%09%09%09%09let%20state%20%3D%20closedTab.state%3B%0A%09%09%09%09%09%09if%28state.entries%5Bstate.index%20-%201%5D.url%20%3D%3D%20ADDONS_URL%29%20%7B%0A%09%09%09%09%09%09%09ss.forgetClosedTab%28window%2C%20i%29%3B%0A%09%09%09%09%09%09%09return%3B%0A%09%09%09%09%09%09%7D%0A%09%09%09%09%09%7D%0A%09%09%09%09%09if%28%21isSecondTry%29%20//%20May%20be%20needed%20in%20SeaMonkey%0A%09%09%09%09%09%09setTimeout%28forgetClosedTab%2C%200%2C%20true%29%3B%0A%09%09%09%09%7D%29%28%29%3B%0A%09%09%09%7D%0A%09%09%7D%0A%0A%09%09if%28%21updEnabled%29%0A%09%09%09Services.prefs.setBoolPref%28updEnabledPref%2C%20false%29%3B%0A%0A%09%09if%28%21notFound.hidden%29%20%7B%0A%09%09%09removeTab%28%29%3B%0A%09%09%09notify%28notFound.getAttribute%28%22value%22%29%29%3B%0A%09%09%09return%3B%0A%09%09%7D%0A%09%09if%28autoUpdateChecked%29%20%7B%0A%09%09%09removeTab%28%29%3B%0A%09%09%09notify%28updated.getAttribute%28%22value%22%29%29%3B%0A%09%09%09return%3B%0A%09%09%7D%0A%0A%09%09tab.collapsed%20%3D%20false%3B%0A%09%09%24%28%22categories%22%29.selectedItem%20%3D%20%24%28%22category-availableUpdates%22%29%3B%0A%09%09var%20tabWin%20%3D%20tab.ownerDocument.defaultView%3B%0A%09%09if%28tbTab%29%0A%09%09%09tabmail.switchToTab%28tbTabInfo%29%3B%0A%09%09else%0A%09%09%09tabWin.gBrowser.selectedTab%20%3D%20tab%3B%0A%09%09setTimeout%28function%28%29%20%7B%0A%09%09%09tabWin.focus%28%29%3B%0A%09%09%09doc.defaultView.focus%28%29%3B%0A%09%09%09%24%28%22addon-list%22%29.focus%28%29%3B%0A%09%09%7D%2C%200%29%3B%0A%09%7D%2C%2050%29%3B%0A%09function%20%24%28id%29%20%7B%0A%09%09return%20doc.getElementById%28id%29%3B%0A%09%7D%0A%09function%20stopWait%28%29%20%7B%0A%09%09clearInterval%28waitTimer%29%3B%0A%09%09progressIcon.restore%28%29%3B%0A%09%09btn.tooltipText%20%3D%20tip%3B%0A%09%09if%28tab.image%20%3D%3D%20image%29%0A%09%09%09tab.image%20%3D%20origIcon%3B%0A%09%09trgWindow.removeEventListener%28%22TabSelect%22%2C%20dontSelectHiddenTab%2C%20false%29%3B%0A%09%09setTimeout%28function%28%29%20%7B%0A%09%09%09delete%20btn._cb_disabled%3B%0A%09%09%7D%2C%20500%29%3B%0A%09%7D%0A%09function%20notify%28msg%29%20%7B%0A%09%09Components.classes%5B%22@mozilla.org/alerts-service%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIAlertsService%29%0A%09%09%09.showAlertNotification%28%0A%09%09%09%09%22chrome%3A//mozapps/skin/extensions/extensionGeneric.png%22%2C%0A%09%09%09%09btn.label%2C%0A%09%09%09%09msg%2C%20false%2C%20%22%22%2C%20null%0A%09%09%09%29%3B%0A%09%7D%0A%7D%0Afunction%20dontSelectHiddenTab%28e%29%20%7B%0A%09//%20%3Ctab%20/%3E%3Ctab%20collapsed%3D%22true%22%20/%3E%0A%09//%20Close%20first%20tab%3A%20collapsed%20tab%20becomes%20selected%0A%09var%20trgTab%20%3D%20e.originalTarget%20%7C%7C%20e.target%3B%0A%09if%28trgTab%20%21%3D%20tab%29%0A%09%09return%3B%0A%0A%09if%28/%5Cn%28%3F%3ABrowserOpenAddonsMgr%7CtoEM%29@chrome%3A%5C/%5C//.test%28new%20Error%28%29.stack%29%29%20%7B%0A%09%09//%20User%20open%20Add-ons%20Manager%2C%20show%20tab%0A%09%09trgWindow.removeEventListener%28%22TabSelect%22%2C%20dontSelectHiddenTab%2C%20false%29%3B%0A%09%09setTimeout%28function%28%29%20%7B%20//%20Hidden%20tab%20can%27t%20be%20selected%2C%20so%20select%20it%20manually...%0A%09%09%09tab.collapsed%20%3D%20tab.closing%20%3D%20false%3B%0A%09%09%09gBrowser.selectedTab%20%3D%20tab%3B%0A%09%09%7D%2C%200%29%3B%0A%09%7D%0A%0A%09function%20done%28t%29%20%7B%0A%09%09if%28%21t.hidden%20%26%26%20%21t.closing%29%20%7B%0A%09%09%09e.preventDefault%28%29%3B%0A%09%09%09e.stopPropagation%28%29%3B%0A%09%09%09return%20gBrowser.selectedTab%20%3D%20t%3B%0A%09%09%7D%0A%09%09return%20false%3B%0A%09%7D%0A%09for%28var%20t%20%3D%20tab.nextSibling%3B%20t%3B%20t%20%3D%20t.nextSibling%29%0A%09%09if%28done%28t%29%29%0A%09%09%09return%3B%0A%09for%28var%20t%20%3D%20tab.previousSibling%3B%20t%3B%20t%20%3D%20t.previousSibling%29%0A%09%09if%28done%28t%29%29%0A%09%09%09return%3B%0A%7D%0Afunction%20ProgressIcon%28btn%29%20%7B%0A%09var%20app%20%3D%20Services.appinfo.name%3B%0A%09if%28app%20%3D%3D%20%22SeaMonkey%22%29%0A%09%09this.imgConnecting%20%3D%20this.imgLoading%20%3D%20%22chrome%3A//communicator/skin/icons/loading.gif%22%3B%0A%09else%20if%28app%20%3D%3D%20%22Thunderbird%22%29%20%7B%0A%09%09this.imgConnecting%20%3D%20%22chrome%3A//messenger/skin/icons/connecting.png%22%3B%0A%09%09this.imgLoading%20%3D%20%22chrome%3A//messenger/skin/icons/loading.png%22%3B%0A%09%7D%0A%09else%20%7B%0A%09%09this.imgConnecting%20%3D%20%22chrome%3A//browser/skin/tabbrowser/connecting.png%22%3B%0A%09%09this.imgLoading%20%3D%20%22chrome%3A//browser/skin/tabbrowser/loading.png%22%3B%0A%09%7D%0A%09if%28%21%28btn%20instanceof%20XULElement%29%29%20%7B%0A%09%09this.loading%20%3D%20this.restore%20%3D%20function%28%29%20%7B%7D%3B%0A%09%09return%20this%3B%0A%09%7D%0A%09var%20useAnimation%20%3D%20app%20%3D%3D%20%22Firefox%22%20%26%26%20parseFloat%28Services.appinfo.platformVersion%29%20%3E%3D%2032%3B%0A%09var%20btnIcon%20%3D%20btn.ownerDocument.getAnonymousElementByAttribute%28btn%2C%20%22class%22%2C%20%22toolbarbutton-icon%22%29%3B%0A%09var%20origIcon%20%3D%20btnIcon.src%3B%0A%09btnIcon.src%20%3D%20this.imgConnecting%3B%0A%09if%28useAnimation%29%20%7B%0A%09%09let%20cs%20%3D%20btnIcon.ownerDocument.defaultView.getComputedStyle%28btnIcon%2C%20null%29%3B%0A%09%09let%20s%20%3D%20btnIcon.style%3B%0A%09%09s.margin%20%3D%20%5Bcs.marginTop%2C%20cs.marginRight%2C%20cs.marginBottom%2C%20cs.marginLeft%5D.join%28%22%20%22%29%3B%0A%09%09s.padding%20%3D%20%5Bcs.paddingTop%2C%20cs.paddingRight%2C%20cs.paddingBottom%2C%20cs.paddingLeft%5D.join%28%22%20%22%29%3B%0A%09%09s.width%20%3D%20cs.width%3B%0A%09%09s.height%20%3D%20cs.height%3B%0A%09%09s.boxShadow%20%3D%20%22none%22%3B%0A%09%09s.borderColor%20%3D%20s.background%20%3D%20%22transparent%22%3B%0A%09%09btnIcon.setAttribute%28%22fadein%22%2C%20%22true%22%29%3B%0A%09%09btnIcon.setAttribute%28%22busy%22%2C%20%22true%22%29%3B%0A%09%09btnIcon.classList.add%28%22tab-throbber%22%29%3B%0A%09%09btnIcon._restore%20%3D%20function%28%29%20%7B%0A%09%09%09delete%20btnIcon._restore%3B%0A%09%09%09btnIcon.removeAttribute%28%22busy%22%29%3B%0A%09%09%09btnIcon.removeAttribute%28%22progress%22%29%3B%0A%09%09%09setTimeout%28function%28%29%20%7B%0A%09%09%09%09btnIcon.classList.remove%28%22tab-throbber%22%29%3B%0A%09%09%09%09btnIcon.removeAttribute%28%22style%22%29%3B%0A%09%09%09%09btnIcon.removeAttribute%28%22fadein%22%29%3B%0A%09%09%09%7D%2C%200%29%3B%0A%09%09%7D%3B%0A%09%7D%0A%09this.loading%20%3D%20function%28%29%20%7B%0A%09%09btnIcon.src%20%3D%20this.imgLoading%3B%0A%09%09if%28useAnimation%29%0A%09%09%09btnIcon.setAttribute%28%22progress%22%2C%20%22true%22%29%3B%0A%09%7D%3B%0A%09this.restore%20%3D%20function%28%29%20%7B%0A%09%09btnIcon.src%20%3D%20origIcon%3B%0A%09%09if%28useAnimation%29%0A%09%09%09btnIcon._restore%28%29%3B%0A%09%7D%3B%0A%09return%20this%3B%0A%7D%0A%7D%29.call%28this%29%3B%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
|
Infocatcher > 04-02-2013 01:36:36 |
Тестовая версия, будьте осторожны! |
Infocatcher > 07-02-2013 21:29:54 |
Check for Addons Updates 0.1.3 (2013-02-07) |
Infocatcher > 09-05-2013 18:56:35 |
Check for Addons Updates 0.1.4 (2013-05-09) |
dennius > 25-12-2013 07:27:52 |
Может добавить возможность просто открывать вкладку с дополнениями, допустим по клику средней клавишей мышки? Или расскажите, как это сделать, если не сложно |
Infocatcher > 26-12-2013 16:23:32 |
dennius пишет
Добавить в инициализацию: Выделить код Код:this.onclick = function(e) { if(e.target == this && e.button == 1) openAddonsManager(); }; function openAddonsManager(view) { var openAddonsMgr = window.BrowserOpenAddonsMgr // Firefox || window.openAddonsMgr // Thunderbird || window.toEM; // SeaMonkey openAddonsMgr(view); } |
dennius > 26-12-2013 23:56:22 |
Infocatcher |
Infocatcher > 18-02-2014 10:08:36 |
Check for Addons Updates 0.1.4.1 (2014-02-18) |
Infocatcher > 13-10-2014 20:29:39 |
Check for Addons Updates 0.1.5 (2014-10-13) |
Infocatcher > 24-01-2020 22:13:49 |
Какой-то обложенный распорками Check for Addons Updates 0.1.6pre (2020-01-24), предположительно работает в Firefox 4 – 73 (изменения). |
voqabuhe > 24-01-2020 22:27:10 |
Infocatcher |
Infocatcher > 24-01-2020 22:34:32 |
voqabuhe пишет
По завершению проверки или управление дополнениями откроет, или всплывающее сообщение в углу экрана выведет. Но могут быть проблемы, у меня иногда при первом запуске и родная проверка дополнений зависала. |
voqabuhe > 24-01-2020 23:02:48 |
Infocatcher |
Infocatcher > 24-01-2020 23:53:40 |
voqabuhe пишет
Скорее всего… |
voqabuhe > 25-01-2020 00:09:25 |
Infocatcher пишет
Точно несвежий. . Дык по вашей же ссылке выше устанавливал Check for Addons Updates 0.1.6pre (2020-01-24) она точно правильная? Или я там не разобрался? А с новым кодом да, всё работает, даже табличка появляется, что обновлений не найдено. Спасибо. 25-01-2020 00:14:00 |
voqabuhe > 31-05-2020 16:36:35 |
а полностью рабочая версия для 76 есть уже? |
Infocatcher > 04-07-2020 15:04:43 |
voqabuhe пишет
Подправил, но не уверен, всё ли: Тестовая: https://github.com/Infocatcher/Custom_B … Updates.js |
voqabuhe > 07-07-2020 22:26:08 |
Infocatcher |
voqabuhe > 23-03-2021 08:25:28 |
Infocatcher |
Infocatcher > 28-03-2021 00:12:18 |
voqabuhe пишет
Исправление уже было, но попало в соседнюю тему: https://forum.mozilla-russia.org/viewto … 18#p789018 Теперь должно работать: Check for Addons Updates [0.1.6pre4 - 2021-03-28] |
voqabuhe > 28-03-2021 02:24:26 |
Infocatcher, спасибо. Работает. |