Reload userChromeES

[userChromeES] Adds the menu item that reloads the userChromeES to the popup menu of the toolbar button and the sidebar menu.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

You will need to install an extension such as Tampermonkey to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name        Reload userChromeES
// @name:ja     userChromeESを再読み込み
// @description [userChromeES] Adds the menu item that reloads the userChromeES to the popup menu of the toolbar button and the sidebar menu.
// @description:ja 【userChromeES】userChromeESを再読み込みするメニューアイテムを、ツールバーボタンのポップアップメニューとサイドバーメニューに追加します。
// @namespace   https://greasyfork.org/users/137
// @version     0.1.0
// @include     popup
// @include     sidebar
// @license     Mozilla Public License Version 2.0 (MPL 2.0); https://www.mozilla.org/MPL/2.0/
// @compatible  Firefox userChromeES用スクリプトです (※GreasemonkeyスクリプトでもuserChromeJS用スクリプトでもありません) / This script is for userChromeES (* neither Greasemonkey nor userChromeJS)
// @author      100の人
// @homepage    https://greasyfork.org/users/137
// ==/UserScript==

(function () {
'use strict';

if (location.pathname === '/sidebar/sidebar.xhtml') {
	document.head.insertAdjacentHTML('beforeend', `<style>
		[name="reload-user-chrome-es"] {
			cursor: pointer;
		}
	</style>`);
}

document.getElementsByTagName('menu')[0].insertAdjacentHTML('beforeend', `
	<li><button type="button" name="reload-user-chrome-es">
		<img src="chrome://browser/content/extension.svg" alt="" />
		${browser.i18n.getUILanguage() === 'ja' ? 'userChromeESを再読み込みする' : 'Reload userChromeES'}
	</button></li>
`);

document.getElementsByName('reload-user-chrome-es')[0].addEventListener('click', () => browser.runtime.reload());

})();