Полезная информация

Юристы зарабатывают огромные деньги и славу, оперируя хорошим знанием законов. Правила форума — простой путь к успешному общению.

№105-12-2012 23:54:12

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 17.0

[CB]Plugins Permissions

Plugins Permissions 0.1.1+ (2013-04-07)
Совместимость: [firefox] Firefox, [seamonkey] SeaMonkey
Автор: Infocatcher
Описание:
Кнопка позволяет быстро переключать разрешения для воспроизведения плагинов (блокировать/разрешить).
Клик левой кнопкой мыши добавляет разрешение для текущего сайта, клик средней кнопкой мыши открывает список разрешений.
Примечание: настройка plugins.click_to_play в about:config должна быть выставлена в true.

К сожалению, начиная с Firefox 20 (Gecko 20) глобальные исключения не работают, только отдельные для каждого плагина.
Поэтому вы должны изменить "Shockwave Flash" и "plugin:flash" в коде (и создать копию этой кнопки), чтобы управлять другими плагинами.
Примечание: кажется, в SeaMonkey 2.17 исключения не работают вообще.

pluginsPermissions-ru.png

Установить:

Выделить код

Код:

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%3EPlugins%20Permissions%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB4klEQVQ4jaWTv24TQRjEf+sz/nNEzmGIk3SQQCwURMFbICGRB0hBHSGegzYICigi8Qq8AQUtLSRyYQmQA8jh7PjO59vd76M428gJiZCY5qSRZnZ25taoKv+D0lli76C3v/vqm9076L24jJvBzBI8eXm847w+732P242lKwxHlgdbDQA+Hg2ZceurUR4E5tnbp2uvAcozp2o12Kmqb2/cWsZ6WG3Br7EB4M7GMpmDGytQUlMRgofAGYNaefPzUcyPnyOiRoV+POH2zSYAne4J16Mq8TCntbLEvbut9XMd1KvlzWYUkqZCpzvCWUMzqtOM6jhr6HRHpKnQjEKuhuXNcx28eZ9eOId1Qpo50lzIrJLmnv3dllm4wrsPn1BAFUQVLyCiiDLlFRGwXhAFaLFgIL4QMzVBAQGjoKKIKiKKUTDyJ93cwE6kEBkQKU70UiQpvoWBUiRbKHH9/uNt8TXyTBgnnuTUMhhY4jgnjnOGA0ty6hgnnizxOFfjWvvR9jxB2v8SJiNPMprgXBF3GuavKIkyGXwN5wbOl4KT/gSf22Kai+aYQr0DysHcQDxllwli/+1hlURBCu20xMCohIjIZbo5jISoBgamP1JQWV6rNNptVR9QbHGp3pjA58PDQ58Pjn8D34QaHZSe1EEAAAAASUVORK5CYII%3D%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B//%20http%3A//infocatcher.ucoz.net/js/cb/pluginsPermissions.js%0A//%20https%3A//forum.mozilla-russia.org/viewtopic.php%3Fid%3D57303%0A//%20https%3A//github.com/Infocatcher/Custom_Buttons/tree/master/Plugins_Permissions%0A%0A//%20Plugins%20Permissions%20button%20for%20Custom%20Buttons%0A//%20%28code%20for%20%22initialization%22%20section%29%0A%0A//%20%28c%29%20Infocatcher%202012-2013%0A//%20version%200.1.1+%20-%202013-04-07%0A%0A//%20Based%20on%20Cookies%20Permissions%20button%0A//%20https%3A//github.com/Infocatcher/Custom_Buttons/tree/master/Cookies_Permissions%0A%0A//%20Note%3A%20plugins.click_to_play%20in%20about%3Aconfig%20%28%22Block%20plugins%22%20checkbox%29%20should%20be%20enabled%0A//%20Unfortunately%20since%20Firefox%2020%20%28Gecko%2020%29%20global%20exclusions%20doesn%27t%20work%2C%20only%20on%20per-plugin%20basis.%0A//%20So%20you%20should%20change%20%22Shockwave%20Flash%22%20and%20%22plugin%3Aflash%22%20in%20the%20source%20%28and%20create%20copy%20of%20this%0A//%20button%29%20to%20menage%20other%20plugins.%0A%0Avar%20options%20%3D%20%7B%0A%09showTempPermissions%3A%20true%2C%20//%20Show%20items%20about%20temporary%20permissions%20%28only%20Gecko%202.0+%29%0A%09tempExpire%3A%20-1%2C%20//%20Type%20of%20temporary%20permissions%0A%09//%20-1%20-%20session%2C%20otherwise%20-%20expire%20after%20given%20time%20%28in%20milliseconds%29%0A%09useBaseDomain%3A%20%7B%20//%20If%20set%20to%20true%2C%20will%20use%20short%20domain%20like%20google.com%20instead%20of%20www.google.com%0A%09%09addPermission%3A%20false%2C%20//%20Add%20%28and%20toggle%29%20permission%20action%0A%09%09openPermissions%3A%20false%2C%20%20//%20Filter%20in%20%22Show%20Exceptions%22%20window%0A%09%7D%2C%0A%09showDefaultPolicy%3A%20true%2C%20//%20Show%20default%20policy%0A%09toggleMode%3A%20Components.interfaces.nsIPermissionManager.ALLOW_ACTION%2C%0A%09//%20ALLOW_ACTION%20or%20DENY_ACTION%0A%09reusePermissionsWindow%3A%20false%2C%20//%20Use%20any%20already%20opened%20permissions%20window%0A%09//%20E.g.%20%22Show%20Exceptions%22%20may%20convert%20%22Exceptions%20-%20Cookies%22%20to%20%22Exceptions%20%u2014%20Plugins%22%0A%09prefillMode%3A%201%2C%20//%200%20-%20move%20caret%20to%20start%2C%201%20-%20select%20all%2C%202%20-%20move%20caret%20to%20end%0A%09moveToStatusBar%3A%20%7B%0A%09%09//%20Move%20button%20to%20Status%20Bar%2C%20only%20for%20SeaMonkey%20or%20Firefox%20%3C%204.0%0A%09%09//%20Be%20careful%2C%20has%20some%20side-effects%20and%20button%20can%27t%20be%20edited%20w/o%20restart%0A%09%09enabled%3A%20false%2C%0A%09%09insertAfter%3A%20%22custombuttons-cookiesPermissionsSBPanel%2Cdownload-monitor%2CpopupIcon%2Cstatusbar-progresspanel%22%0A%09%09//%20Like%20https%3A//developer.mozilla.org/en-US/docs/XUL/Attribute/insertafter%0A%09%09//%20Also%20looks%20for%20nodes%20with%20%22cb_id%22%20attribute%0A%09%7D%0A%7D%3B%0A%0Afunction%20_localize%28sid%29%20%7B%0A%09var%20strings%20%3D%20%7B%0A%09%09en%3A%20%7B%0A%09%09%09defaultTooltiptext%3A%20%22Plugins%3A%20Default%22%2C%0A%09%09%09denyTooltiptext%3A%20%22Plugins%3A%20Block%22%2C%0A%09%09%09allowTooltiptext%3A%20%22Plugins%3A%20Allow%22%2C%0A%09%09%09notAvailableTooltiptext%3A%20%22Plugins%3A%20n/a%22%2C%0A%09%09%09unknownTooltiptext%3A%20%22Plugins%3A%20%3F%3F%3F%22%2C%0A%09%09%09errorTooltiptext%3A%20%22Plugins%3A%20Error%21%22%2C%0A%0A%09%09%09defaultDenyTooltiptext%3A%20%22Plugins%3A%20Block%20%28Default%29%22%2C%0A%09%09%09defaultAllowTooltiptext%3A%20%22Plugins%3A%20Allow%20%28Default%29%22%2C%0A%0A%09%09%09defaultLabel%3A%20%22Default%22%2C%0A%09%09%09defaultAccesskey%3A%20%22D%22%2C%0A%09%09%09denyLabel%3A%20%22Block%22%2C%0A%09%09%09denyAccesskey%3A%20%22B%22%2C%0A%09%09%09denyTempLabel%3A%20%22Temporarily%20Block%22%2C%0A%09%09%09denyTempAccesskey%3A%20%22k%22%2C%0A%09%09%09allowLabel%3A%20%22Allow%22%2C%0A%09%09%09allowAccesskey%3A%20%22A%22%2C%0A%09%09%09allowTempLabel%3A%20%22Temporarily%20Allow%22%2C%0A%09%09%09allowTempAccesskey%3A%20%22w%22%2C%0A%0A%09%09%09blockPluginsLabel%3A%20%22Block%20plugins%22%2C%0A%09%09%09blockPluginsAccesskey%3A%20%22c%22%2C%0A%09%09%09removeTempPermissionsLabel%3A%20%22Remove%20Temporary%20Permissions%22%2C%0A%09%09%09removeTempPermissionsAccesskey%3A%20%22T%22%2C%0A%0A%09%09%09showPermissionsLabel%3A%20%22Show%20Exceptions%u2026%22%2C%0A%09%09%09showPermissionsAccesskey%3A%20%22x%22%2C%0A%0A%09%09%09buttonMenu%3A%20%22Button%20Menu%22%2C%0A%09%09%09buttonMenuAccesskey%3A%20%22M%22%2C%0A%0A%09%09%09exceptionsTitle%3A%20%22Exceptions%20%u2014%20Plugins%22%2C%0A%09%09%09exceptionsDesc%3A%20%22You%20can%20specify%20which%20websites%20are%20always%20or%20never%20allowed%20to%20%5C%0A%09%09%09%09play%20plugins.%20Type%20the%20exact%20address%20of%20the%20site%20you%20want%20to%20manage%20and%20%5C%0A%09%09%09%09then%20click%20Block%20or%20Allow.%22%0A%09%09%7D%2C%0A%09%09ru%3A%20%7B%0A%09%09%09defaultTooltiptext%3A%20%22%u041F%u043B%u0430%u0433%u0438%u043D%u044B%3A%20%u041F%u043E%20%u0443%u043C%u043E%u043B%u0447%u0430%u043D%u0438%u044E%22%2C%0A%09%09%09denyTooltiptext%3A%20%22%u041F%u043B%u0430%u0433%u0438%u043D%u044B%3A%20%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%22%2C%0A%09%09%09allowTooltiptext%3A%20%22%u041F%u043B%u0430%u0433%u0438%u043D%u044B%3A%20%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%22%2C%0A%09%09%09notAvailableTooltiptext%3A%20%22%u041F%u043B%u0430%u0433%u0438%u043D%u044B%3A%20%u043D/%u0434%22%2C%0A%09%09%09unknownTooltiptext%3A%20%22%u041F%u043B%u0430%u0433%u0438%u043D%u044B%3A%20%3F%3F%3F%22%2C%0A%09%09%09errorTooltiptext%3A%20%22%u041F%u043B%u0430%u0433%u0438%u043D%u044B%3A%20%u041E%u0448%u0438%u0431%u043A%u0430%21%22%2C%0A%0A%09%09%09defaultDenyTooltiptext%3A%20%22%u041F%u043B%u0430%u0433%u0438%u043D%u044B%3A%20%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%20%28%u043F%u043E%20%u0443%u043C%u043E%u043B%u0447%u0430%u043D%u0438%u044E%29%22%2C%0A%09%09%09defaultAllowTooltiptext%3A%20%22%u041F%u043B%u0430%u0433%u0438%u043D%u044B%3A%20%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%20%28%u043F%u043E%20%u0443%u043C%u043E%u043B%u0447%u0430%u043D%u0438%u044E%29%22%2C%0A%0A%09%09%09defaultLabel%3A%20%22%u041F%u043E%20%u0443%u043C%u043E%u043B%u0447%u0430%u043D%u0438%u044E%22%2C%0A%09%09%09defaultAccesskey%3A%20%22%u0443%22%2C%0A%09%09%09denyLabel%3A%20%22%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%22%2C%0A%09%09%09denyAccesskey%3A%20%22%u0411%22%2C%0A%09%09%09denyTempLabel%3A%20%22%u0412%u0440%u0435%u043C%u0435%u043D%u043D%u043E%20%u0431%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%22%2C%0A%09%09%09denyTempAccesskey%3A%20%22%u043B%22%2C%0A%09%09%09allowLabel%3A%20%22%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%22%2C%0A%09%09%09allowAccesskey%3A%20%22%u0420%22%2C%0A%09%09%09allowTempLabel%3A%20%22%u0412%u0440%u0435%u043C%u0435%u043D%u043D%u043E%20%u0440%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%22%2C%0A%09%09%09allowTempAccesskey%3A%20%22%u0448%22%2C%0A%0A%09%09%09blockPluginsLabel%3A%20%22%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%20%u043F%u043B%u0430%u0433%u0438%u043D%u044B%22%2C%0A%09%09%09blockPluginsAccesskey%3A%20%22%u043A%22%2C%0A%09%09%09removeTempPermissionsLabel%3A%20%22%u0423%u0434%u0430%u043B%u0438%u0442%u044C%20%u0432%u0440%u0435%u043C%u0435%u043D%u043D%u044B%u0435%20%u0438%u0441%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u044F%22%2C%0A%09%09%09removeTempPermissionsAccesskey%3A%20%22%u044B%22%2C%0A%0A%09%09%09showPermissionsLabel%3A%20%22%u041F%u043E%u043A%u0430%u0437%u0430%u0442%u044C%20%u0438%u0441%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u044F%u2026%22%2C%0A%09%09%09showPermissionsAccesskey%3A%20%22%u0438%22%2C%0A%0A%09%09%09buttonMenu%3A%20%22%u041C%u0435%u043D%u044E%20%u043A%u043D%u043E%u043F%u043A%u0438%22%2C%0A%09%09%09buttonMenuAccesskey%3A%20%22%u041C%22%2C%0A%0A%09%09%09exceptionsTitle%3A%20%22%u0418%u0441%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u044F%20%u2014%20%u041F%u043B%u0430%u0433%u0438%u043D%u044B%22%2C%0A%09%09%09exceptionsDesc%3A%20%22%u0412%u044B%20%u043C%u043E%u0436%u0435%u0442%u0435%20%u0443%u043A%u0430%u0437%u0430%u0442%u044C%2C%20%u043A%u0430%u043A%u0438%u043C%20%u0432%u0435%u0431-%u0441%u0430%u0439%u0442%u0430%u043C%20%u0440%u0430%u0437%u0440%u0435%u0448%u0435%u043D%u043E%20%u0438%u043B%u0438%20%u0437%u0430%u043F%u0440%u0435%u0449%u0435%u043D%u043E%20%5C%0A%09%09%09%09%u0430%u0432%u0442%u043E%u043C%u0430%u0442%u0438%u0447%u0435%u0441%u043A%u0438%20%u043F%u0440%u043E%u0438%u0433%u0440%u044B%u0432%u0430%u0442%u044C%20%u043F%u043B%u0430%u0433%u0438%u043D%u044B.%20%u0412%u0432%u0435%u0434%u0438%u0442%u0435%20%u0442%u043E%u0447%u043D%u044B%u0439%20%u0430%u0434%u0440%u0435%u0441%20%u0441%u0430%u0439%u0442%u0430%20%u0438%20%u043D%u0430%u0436%u043C%u0438%u0442%u0435%20%5C%0A%09%09%09%09%u043A%u043D%u043E%u043F%u043A%u0443%20%AB%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%BB%20%u0438%u043B%u0438%20%AB%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%BB.%22%0A%09%09%7D%0A%09%7D%3B%0A%09var%20locale%20%3D%20%28cbu.getPrefs%28%22general.useragent.locale%22%29%20%7C%7C%20%22en%22%29.match%28/%5E%5Ba-z%5D*/%29%5B0%5D%3B%0A%09_localize%20%3D%20function%28sid%29%20%7B%0A%09%09return%20strings%5Blocale%5D%20%26%26%20strings%5Blocale%5D%5Bsid%5D%20%7C%7C%20strings.en%5Bsid%5D%20%7C%7C%20sid%3B%0A%09%7D%3B%0A%09return%20_localize.apply%28this%2C%20arguments%29%3B%0A%7D%0A%0Athis.onclick%20%3D%20function%28e%29%20%7B%0A%09if%28e.target%20%21%3D%20this%29%0A%09%09return%3B%0A%09var%20but%20%3D%20e.button%3B%0A%09var%20hasModifier%20%3D%20this.permissions.hasModifier%28e%29%3B%0A%09if%28but%20%3D%3D%200%20%26%26%20%21hasModifier%29%20%7B%0A%09%09this.permissions.togglePermission%28this.permissions.options.toggleMode%29%3B%0A%09%09//%20Allow%20use%20%22command%22%20section%20only%20from%20hotkey%3A%0A%09%09e.preventDefault%28%29%3B%0A%09%09e.stopPropagation%28%29%3B%0A%09%7D%0A%09else%20if%28but%20%3D%3D%201%20%7C%7C%20but%20%3D%3D%200%20%26%26%20hasModifier%29%0A%09%09this.permissions.openPermissions%28%29%3B%0A%7D%3B%0Aif%28%21this.hasOwnProperty%28%22defaultContextId%22%29%29%0A%09this.defaultContextId%20%3D%20this.getAttribute%28%22context%22%29%20%7C%7C%20%22custombuttons-contextpopup%22%3B%0Athis.oncontextmenu%20%3D%20function%28e%29%20%7B%0A%09if%28e.target%20%21%3D%20this%29%0A%09%09return%3B%0A%09this.permissions.initContextOnce%28%29%3B%0A%09this.setAttribute%28%0A%09%09%22context%22%2C%0A%09%09this.permissions.hasModifier%28e%29%0A%09%09%09%3F%20this.defaultContextId%0A%09%09%09%3A%20this.permissions.mpId%0A%09%29%3B%0A%7D%3B%0A%0Athis.permissions%20%3D%20%7B%0A%09//permissionType%3A%20%22plugins%22%2C%0A%09get%20permissionType%28%29%20%7B%0A%09%09var%20permissionType%20%3D%20%22plugins%22%3B%0A%09%09if%28parseFloat%28this.appInfo.platformVersion%29%20%3E%3D%2020%29%20try%20%7B%0A%09%09%09let%20pluginName%20%3D%20%22Shockwave%20Flash%22%3B%0A%09%09%09permissionType%20%3D%20%22plugin%3Aflash%22%3B%20//%20Fallback%20value%0A%0A%09%09%09//%20Based%20on%20code%20from%20chrome%3A//browser/content/pageinfo/permissions.js%0A%09%09%09let%20pluginHost%20%3D%20Components.classes%5B%22@mozilla.org/plugin/host%3B1%22%5D%0A%09%09%09%09.getService%28Components.interfaces.nsIPluginHost%29%3B%0A%09%09%09let%20tags%20%3D%20pluginHost.getPluginTags%28%29%3B%0A%09%09%09for%28let%20i%20%3D%200%2C%20l%20%3D%20tags.length%3B%20i%20%3C%20l%3B%20++i%29%20%7B%0A%09%09%09%09let%20tag%20%3D%20tags%5Bi%5D%3B%0A%09%09%09%09if%28tag.name%20%3D%3D%20pluginName%29%20%7B%0A%09%09%09%09%09let%20mimeType%20%3D%20tag.getMimeTypes%28%29%5B0%5D.type%3B%0A%09%09%09%09%09permissionType%20%3D%20pluginHost.getPermissionStringForType%28mimeType%29%3B%0A%09%09%09%09%09break%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%7D%0A%09%09delete%20this.permissionType%3B%0A%09%09return%20this.permissionType%20%3D%20permissionType%3B%0A%09%7D%2C%0A%09popupClass%3A%20%22cbPluginsPermissionsPopup%22%2C%0A%0A%09button%3A%20this%2C%0A%09options%3A%20options%2C%0A%0A%09PERMISSIONS_NOT_SUPPORTED%3A%20-1%2C%0A%09PERMISSIONS_ERROR%3A%20%20%20%20%20%20%20%20%20-2%2C%0A%0A%09errPrefix%3A%20%22%5BCustom%20Buttons%20%3A%3A%20Plugins%20Permissions%5D%20%22%2C%0A%0A%09get%20pm%28%29%20%7B%0A%09%09delete%20this.pm%3B%0A%09%09return%20this.pm%20%3D%20Components.classes%5B%22@mozilla.org/permissionmanager%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIPermissionManager%29%3B%0A%09%7D%2C%0A%09get%20io%28%29%20%7B%0A%09%09delete%20this.io%3B%0A%09%09return%20this.io%20%3D%20Components.classes%5B%22@mozilla.org/network/io-service%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIIOService%29%3B%0A%09%7D%2C%0A%09get%20oSvc%28%29%20%7B%0A%09%09return%20Components.classes%5B%22@mozilla.org/observer-service%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIObserverService%29%3B%0A%09%7D%2C%0A%09get%20wm%28%29%20%7B%0A%09%09delete%20this.wm%3B%0A%09%09return%20this.wm%20%3D%20Components.classes%5B%22@mozilla.org/appshell/window-mediator%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIWindowMediator%29%3B%0A%09%7D%2C%0A%09get%20tld%28%29%20%7B%0A%09%09delete%20this.tld%3B%0A%09%09return%20this.tld%20%3D%20Components.classes%5B%22@mozilla.org/network/effective-tld-service%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIEffectiveTLDService%29%3B%0A%09%7D%2C%0A%0A%09initialized%3A%20false%2C%0A%09mp%3A%20null%2C%0A%09init%3A%20function%28%29%20%7B%0A%09%09if%28this.initialized%29%0A%09%09%09return%3B%0A%09%09this.initialized%20%3D%20true%3B%0A%0A%09%09if%28this.options.moveToStatusBar.enabled%29%0A%09%09%09this.moveToStatusBar%28%29%3B%0A%0A%09%09var%20dummy%20%3D%20function%28%29%20%7B%7D%3B%0A%09%09this.progressListener%20%3D%20%7B%0A%09%09%09context%3A%20this%2C%0A%09%09%09onStateChange%3A%20dummy%2C%0A%09%09%09onProgressChange%3A%20dummy%2C%0A%09%09%09onLocationChange%3A%20function%28aWebProgress%2C%20aRequest%2C%20aLocation%29%20%7B%0A%09%09%09%09this.context.updButtonState%28%29%3B%0A%09%09%09%7D%2C%0A%09%09%09onStatusChange%3A%20dummy%2C%0A%09%09%09onSecurityChange%3A%20dummy%0A%09%09%7D%3B%0A%09%09gBrowser.addProgressListener%28this.progressListener/*%2C%20Components.interfaces.nsIWebProgress.NOTIFY_LOCATION*/%29%3B%0A%0A%09%09this.permissionsObserver%20%3D%20%7B%0A%09%09%09context%3A%20this%2C%0A%09%09%09observe%3A%20function%28subject%2C%20topic%2C%20data%29%20%7B%0A%09%09%09%09if%28topic%20%21%3D%20%22perm-changed%22%29%0A%09%09%09%09%09return%3B%0A%09%09%09%09var%20permission%20%3D%20subject.QueryInterface%28Components.interfaces.nsIPermission%29%3B%0A%09%09%09%09var%20type%20%3D%20this.context.permissionType%3B%0A%09%09%09%09if%28permission.type%20%21%3D%20type%29%0A%09%09%09%09%09return%3B%0A%09%09%09%09this.context.updButtonState%28%29%3B%0A%09%09%09%09if%28data%20%3D%3D%20%22deleted%22%29%20%7B%0A%09%09%09%09%09//%20See%20chrome%3A//browser/content/preferences/permissions.js%0A%09%09%09%09%09//%20observe%3A%20function%20%28aSubject%2C%20aTopic%2C%20aData%29%0A%09%09%09%09%09let%20win%20%3D%20this.context.wm.getMostRecentWindow%28%22Browser%3APermissions%22%29%3B%0A%09%09%09%09%09if%28win%20%26%26%20%22gPermissionManager%22%20in%20win%20%26%26%20win.gPermissionManager._type%20%3D%3D%20type%29%20%7B%0A%09%09%09%09%09%09let%20pm%20%3D%20win.gPermissionManager%3B%0A%09%09%09%09%09%09let%20perms%20%3D%20pm._permissions%3B%0A%09%09%09%09%09%09for%28let%20i%20%3D%200%2C%20l%20%3D%20perms.length%3B%20i%20%3C%20l%3B%20++i%29%20%7B%0A%09%09%09%09%09%09%09if%28perms%5Bi%5D.host%20%3D%3D%20permission.host%29%20%7B%0A%09%09%09%09%09%09%09%09perms.splice%28i%2C%201%29%3B%0A%09%09%09%09%09%09%09%09--pm._view._rowCount%3B%0A%09%09%09%09%09%09%09%09pm._tree.treeBoxObject.rowCountChanged%28i%2C%20-1%29%3B%0A%09%09%09%09%09%09%09%09pm._tree.treeBoxObject.invalidate%28%29%3B%0A%09%09%09%09%09%09%09%09break%3B%0A%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%7D%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%09/*%0A%09%09%09%09if%28this.context.getBaseDomain%28permission.host%29%20%3D%3D%20this.context.currentBaseDomain%29%20%7B%0A%09%09%09%09%09//%20See%20chrome%3A//browser/content/browser.js%0A%09%09%09%09%09var%20pm%20%3D%20this.context.pm%3B%0A%09%09%09%09%09switch%28this.context.getPermission%28%29%29%20%7B%0A%09%09%09%09%09%09case%20pm.DENY_ACTION%3A%0A%09%09%09%09%09%09%09let%20notification%20%3D%20PopupNotifications.getNotification%28%22click-to-play-plugins%22%2C%20gBrowser.selectedBrowser%29%3B%0A%09%09%09%09%09%09%09if%20%28notification%29%0A%09%09%09%09%09%09%09%09notification.remove%28%29%3B%0A%09%09%09%09%09%09%09gPluginHandler._removeClickToPlayOverlays%28content%29%3B%0A%09%09%09%09%09%09break%3B%0A%09%09%09%09%09%09case%20pm.ALLOW_ACTION%3A%0A%09%09%09%09%09%09%09gPluginHandler.activatePlugins%28content%29%3B%0A%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%09*/%0A%09%09%09%7D%0A%09%09%7D%3B%0A%09%09this.oSvc.addObserver%28this.permissionsObserver%2C%20%22perm-changed%22%2C%20false%29%3B%0A%0A%09%09var%20ps%20%3D%20this.prefs%20%3D%20%7B%0A%09%09%09context%3A%20this%2C%0A%09%09%09get%20branch%28%29%20%7B%0A%09%09%09%09delete%20this.branch%3B%0A%09%09%09%09return%20this.branch%20%3D%20Components.classes%5B%22@mozilla.org/preferences-service%3B1%22%5D%0A%09%09%09%09%09.getService%28Components.interfaces.nsIPrefService%29%0A%09%09%09%09%09.getBranch%28%22plugins.click_to_play%22%29%0A%09%09%09%09%09.QueryInterface%28Components.interfaces.nsIPrefBranch2%20%7C%7C%20Components.interfaces.nsIPrefBranch%29%3B%0A%09%09%09%7D%2C%0A%09%09%09get%3A%20function%28name%29%20%7B%0A%09%09%09%09try%20%7B%0A%09%09%09%09%09return%20this.branch.getBoolPref%28name%20%7C%7C%20%22%22%29%3B%0A%09%09%09%09%7D%0A%09%09%09%09catch%28e%29%20%7B%0A%09%09%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%09%09%7D%0A%09%09%09%09return%20false%3B%0A%09%09%09%7D%2C%0A%09%09%09set%3A%20function%28val%2C%20name%29%20%7B%0A%09%09%09%09try%20%7B%0A%09%09%09%09%09this.branch.setBoolPref%28name%20%7C%7C%20%22%22%2C%20val%29%3B%0A%09%09%09%09%7D%0A%09%09%09%09catch%28e%29%20%7B%0A%09%09%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%2C%0A%09%09%09observe%3A%20function%28subject%2C%20topic%2C%20data%29%20%7B%0A%09%09%09%09if%28topic%20%21%3D%20%22nsPref%3Achanged%22%20%7C%7C%20data%20%21%3D%20%22%22%29%0A%09%09%09%09%09return%3B%0A%09%09%09%09var%20ctx%20%3D%20this.context%3B%0A%09%09%09%09ctx.defaultDeny%20%3D%20this.get%28%29%3B%0A%09%09%09%09ctx.updButtonState%28%29%3B%0A%09%09%09%09ctx.updToggleBlockItem%28%29%3B%0A%09%09%09%7D%0A%09%09%7D%3B%0A%09%09if%28this.options.showDefaultPolicy%29%20%7B%0A%09%09%09this.defaultDeny%20%3D%20ps.get%28%29%3B%0A%09%09%09ps.branch.addObserver%28%22%22%2C%20ps%2C%20false%29%3B%0A%09%09%7D%0A%0A%09%09this.updButtonState%28%29%3B%0A%09%7D%2C%0A%09destroy%3A%20function%28%29%20%7B%0A%09%09if%28%21this.initialized%29%0A%09%09%09return%3B%0A%09%09this.initialized%20%3D%20false%3B%0A%0A%09%09gBrowser.removeProgressListener%28this.progressListener%29%3B%0A%09%09this.oSvc.removeObserver%28this.permissionsObserver%2C%20%22perm-changed%22%29%3B%0A%09%09if%28this.options.showDefaultPolicy%29%0A%09%09%09this.prefs.branch.removeObserver%28%22%22%2C%20this.prefs%29%3B%0A%09%09this.progressListener%20%3D%20this.permissionsObserver%20%3D%20this.prefs%20%3D%20null%3B%0A%09%7D%2C%0A%09initContextOnce%3A%20function%28%29%20%7B%0A%09%09this.initContextOnce%20%3D%20function%28%29%20%7B%7D%3B%0A%0A%09%09this.mpId%20%3D%20this.button.id%20+%20%22-context%22%3B%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09var%20noTempPermissions%20%3D%20%21this.options.showTempPermissions%20%7C%7C%20%21this.hasTempPermissions%3B%0A%09%09var%20mp%20%3D%20this.mp%20%3D%20this.button.appendChild%28this.parseXULFromString%28%27%5C%0A%09%09%09%3Cmenupopup%20xmlns%3D%22http%3A//www.mozilla.org/keymaster/gatekeeper/there.is.only.xul%22%5C%0A%09%09%09%09id%3D%22%27%20+%20this.mpId%20+%20%27%22%5C%0A%09%09%09%09class%3D%22%27%20+%20this.popupClass%20+%20%27%22%5C%0A%09%09%09%09onpopupshowing%3D%22%5C%0A%09%09%09%09%09if%28event.target%20%21%3D%20this%29%5C%0A%09%09%09%09%09%09return%20true%3B%5C%0A%09%09%09%09%09document.popupNode%20%3D%20this.parentNode%3B%5C%0A%09%09%09%09%09return%20this.parentNode.permissions.updMenu%28%29%3B%22%5C%0A%09%09%09%09onpopuphidden%3D%22if%28event.target%20%3D%3D%20this%29%20document.popupNode%20%3D%20null%3B%22%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.UNKNOWN_ACTION%20+%20%27%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.removePermission%28%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22defaultLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22defaultAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuseparator%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.DENY_ACTION%20+%20%27%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.addPermission%28Components.interfaces.nsIPermissionManager.DENY_ACTION%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22denyLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22denyAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.DENY_ACTION%20+%20%27-temp%22%5C%0A%09%09%09%09%09collapsed%3D%22%27%20+%20noTempPermissions%20+%20%27%22%5C%0A%09%09%09%09%09class%3D%22cbTempPermission%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.addPermission%28Components.interfaces.nsIPermissionManager.DENY_ACTION%2C%20true%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22denyTempLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22denyTempAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.ALLOW_ACTION%20+%20%27%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.addPermission%28Components.interfaces.nsIPermissionManager.ALLOW_ACTION%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22allowLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22allowAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.ALLOW_ACTION%20+%20%27-temp%22%5C%0A%09%09%09%09%09collapsed%3D%22%27%20+%20noTempPermissions%20+%20%27%22%5C%0A%09%09%09%09%09class%3D%22cbTempPermission%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.addPermission%28Components.interfaces.nsIPermissionManager.ALLOW_ACTION%2C%20true%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22allowTempLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22allowTempAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuseparator%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%5C%0A%09%09%09%09%09cb_id%3D%22toggleBlock%22%5C%0A%09%09%09%09%09type%3D%22checkbox%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.toggleBlock%28this.getAttribute%28%5C%27checked%5C%27%29%20%3D%3D%20%5C%27true%5C%27%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22blockPluginsLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22blockPluginsAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%5C%0A%09%09%09%09%09cb_id%3D%22removeTempPermissions%22%5C%0A%09%09%09%09%09hidden%3D%22%27%20+%20noTempPermissions%20+%20%27%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.removeTempPermissions%28%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22removeTempPermissionsLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22removeTempPermissionsAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuseparator%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%5C%0A%09%09%09%09%09cb_id%3D%22openPermissions%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.openPermissions%28%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22showPermissionsLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22showPermissionsAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuseparator%20/%3E%5C%0A%09%09%09%09%3Cmenu%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22buttonMenu%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22buttonMenuAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%3C/menupopup%3E%27%0A%09%09%29%29%3B%0A%09%09var%20cbPopup%20%3D%20document.getElementById%28this.button.defaultContextId%29%3B%0A%09%09if%28%21cbPopup%29%0A%09%09%09Components.utils.reportError%28this.errPrefix%20+%20%22cb%20menu%20not%20found%22%29%3B%0A%09%09else%20%7B%0A%09%09%09cbPopup%20%3D%20cbPopup.cloneNode%28true%29%3B%0A%09%09%09let%20id%20%3D%20%22-%22%20+%20this.button.id.match%28/%5Cd*%24/%29%5B0%5D%20+%20%22-cloned%22%3B%0A%09%09%09cbPopup.id%20+%3D%20id%3B%0A%09%09%09Array.slice%28cbPopup.getElementsByAttribute%28%22id%22%2C%20%22*%22%29%29.forEach%28function%28node%29%20%7B%0A%09%09%09%09node.id%20+%3D%20id%3B%0A%09%09%09%7D%29%3B%0A%09%09%09cbPopup.setAttribute%28%0A%09%09%09%09%22onpopupshowing%22%2C%0A%09%09%09%09%27%5C%0A%09%09%09%09var%20btn%20%3D%20document.popupNode%20%3D%20this.parentNode.parentNode.parentNode%3B%5Cn%5C%0A%09%09%09%09custombutton.setContextMenuVisibility%28btn%29%3B%27%0A%09%09%09%29%3B%0A%09%09%09let%20menu%20%3D%20mp.lastChild%3B%0A%09%09%09menu.appendChild%28cbPopup%29%3B%0A%09%09%7D%0A%09%7D%2C%0A%09moveToStatusBar%3A%20function%28%29%20%7B%0A%09%09var%20insPoint%3B%0A%09%09this.options.moveToStatusBar.insertAfter%0A%09%09%09.split%28/%2C%5Cs*/%29%0A%09%09%09.some%28function%28id%29%20%7B%0A%09%09%09%09insPoint%20%3D%20document.getElementsByAttribute%28%22cb_id%22%2C%20id%29%5B0%5D%0A%09%09%09%09%09%7C%7C%20document.getElementById%28id%29%3B%0A%09%09%09%09return%20insPoint%3B%0A%09%09%09%7D%29%3B%0A%09%09if%28%21insPoint%29%0A%09%09%09return%3B%0A%0A%09%09var%20btn%20%3D%20this.button%3B%0A%09%09//%20Make%20%3Ctoolbarbutton%3E%20looks%20like%20%3Cimage%3E%2C%20see%20CSS%0A%09%09btn.className%20+%3D%20%22%20custombuttons-insideStatusbarpanel%22%3B%0A%09%09//%20And%20insert%20it%20into%20%3Cstatusbarpanel%3E%0A%09%09var%20spId%20%3D%20btn.id%20+%20%22-statusbarpanel%22%3B%0A%09%09var%20sp%20%3D%20document.getElementById%28spId%29%3B%0A%09%09sp%20%26%26%20sp.parentNode.removeChild%28sp%29%3B%0A%09%09sp%20%3D%20document.createElement%28%22statusbarpanel%22%29%3B%0A%09%09sp.id%20%3D%20spId%3B%0A%09%09sp.setAttribute%28%22cb_id%22%2C%20%22custombuttons-pluginsPermissionsSBPanel%22%29%3B%0A%09%09sp.appendChild%28btn%29%3B%0A%09%09insPoint.parentNode.insertBefore%28sp%2C%20insPoint.nextSibling%29%3B%0A%09%7D%2C%0A%0A%09get%20currentHost%28%29%20%7B%0A%09%09var%20loc%20%3D%20content.location%3B%0A%09%09if%28%5B%22view-source%3A%22%2C%20%22about%3A%22%2C%20%22chrome%3A%22%2C%20%22resource%3A%22%2C%20%22javascript%3A%22%2C%20%22data%3A%22%5D.indexOf%28loc.protocol%29%20%3D%3D%20-1%29%20try%20%7B%0A%09%09%09return%20loc.hostname%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%7D%0A%09%09return%20%22%22%3B%0A%09%7D%2C%0A%09get%20currentBaseDomain%28%29%20%7B%0A%09%09return%20this.getBaseDomain%28this.currentHost%29%3B%0A%09%7D%2C%0A%09get%20appInfo%28%29%20%7B%0A%09%09delete%20this.appInfo%3B%0A%09%09return%20this.appInfo%20%3D%20Components.classes%5B%22@mozilla.org/xre/app-info%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIXULAppInfo%29%3B%0A%09%7D%2C%0A%09get%20isSeaMonkey%28%29%20%7B%0A%09%09delete%20this.isSeaMonkey%3B%0A%09%09return%20this.isSeaMonkey%20%3D%20this.appInfo.name%20%3D%3D%20%22SeaMonkey%22%3B%0A%09%7D%2C%0A%09getURI%3A%20function%28host%29%20%7B%0A%09%09if%28host.indexOf%28%22%3A%22%29%20%21%3D%20-1%20%26%26%20/%5E%5B%3A%5Cda-f.%5D+%24/.test%28host%29%29%20//%20IPv6%0A%09%09%09host%20%3D%20%22%5B%22%20+%20host%20+%20%22%5D%22%3B%0A%09%09try%20%7B%0A%09%09%09return%20this.io.newURI%28%22http%3A//%22%20+%20host%2C%20null%2C%20null%29%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%09Components.utils.reportError%28this.errPrefix%20+%20%22Invalid%20host%3A%20%5C%22%22%20+%20host%20+%20%22%5C%22%22%29%3B%0A%09%09%09throw%20e%3B%0A%09%09%7D%0A%09%7D%2C%0A%09getBaseDomain%3A%20function%28host%29%20%7B%0A%09%09if%28host%29%20try%20%7B%0A%09%09%09return%20this.tld.getBaseDomainFromHost%28host%29%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%7D%0A%09%09return%20host%3B%0A%09%7D%2C%0A%0A%09showMenu%3A%20function%28e%2C%20isContext%2C%20mp%29%20%7B%0A%09%09document.popupNode%20%3D%20this.button.ownerDocument.popupNode%20%3D%20this.button%3B%0A%09%09if%28%21mp%29%20%7B%0A%09%09%09this.initContextOnce%28%29%3B%0A%09%09%09mp%20%3D%20this.mp%3B%0A%09%09%7D%0A%09%09if%28%22openPopupAtScreen%22%20in%20mp%29%0A%09%09%09mp.openPopupAtScreen%28e.screenX%2C%20e.screenY%2C%20isContext%29%3B%0A%09%09else%0A%09%09%09mp.showPopup%28this%2C%20e.screenX%2C%20e.screenY%2C%20isContext%20%3F%20%22context%22%20%3A%20%22popup%22%2C%20null%2C%20null%29%3B%0A%09%7D%2C%0A%09updMenu%3A%20function%28%29%20%7B%0A%09%09var%20permission%20%3D%20this.options.showTempPermissions%0A%09%09%09%3F%20this.getPermissionEx%28%29%0A%09%09%09%3A%20this.getPermission%28%29%3B%0A%0A%09%09var%20noPermissions%20%3D%20permission%20%3D%3D%20this.PERMISSIONS_NOT_SUPPORTED%3B%0A%09%09Array.forEach%28%0A%09%09%09this.mp.getElementsByAttribute%28%22cb_permission%22%2C%20%22*%22%29%2C%0A%09%09%09function%28mi%29%20%7B%0A%09%09%09%09mi.hidden%20%3D%20noPermissions%3B%0A%09%09%09%09var%20ns%20%3D%20mi.nextSibling%3B%0A%09%09%09%09if%28ns%20%26%26%20ns.localName%20%3D%3D%20%22menuseparator%22%29%0A%09%09%09%09%09ns.hidden%20%3D%20noPermissions%3B%0A%09%09%09%7D%0A%09%09%29%3B%0A%0A%09%09if%28%21noPermissions%29%20%7B%0A%09%09%09let%20cbPermission%20%3D%20permission.capability%20%7C%7C%20permission%3B%0A%09%09%09if%28%0A%09%09%09%09this.options.showTempPermissions%0A%09%09%09%09%26%26%20permission%20instanceof%20Components.interfaces.nsIPermission%0A%09%09%09%09%26%26%20%22expireType%22%20in%20permission%0A%09%09%09%09%26%26%20permission.expireType%20%21%3D%20this.pm.EXPIRE_NEVER%0A%09%09%09%29%0A%09%09%09%09cbPermission%20+%3D%20%22-temp%22%3B%0A%09%09%09let%20mi%20%3D%20this.mp.getElementsByAttribute%28%22cb_permission%22%2C%20cbPermission%29%3B%0A%09%09%09mi.length%20%26%26%20mi%5B0%5D.setAttribute%28%22checked%22%2C%20%22true%22%29%3B%0A%09%09%7D%0A%0A%09%09if%28this.hasTempPermissions%29%20%7B%0A%09%09%09let%20maxItems%20%3D%2010%3B%0A%09%09%09let%20removeItem%20%3D%20this.mp.getElementsByAttribute%28%22cb_id%22%2C%20%22removeTempPermissions%22%29%5B0%5D%3B%0A%09%09%09let%20tempPermissions%20%3D%20this.removeTempPermissions%28true%29%3B%0A%09%09%09removeItem.disabled%20%3D%20%21tempPermissions.length%3B%0A%09%09%09if%28tempPermissions.length%20%3E%20maxItems%29%0A%09%09%09%09tempPermissions.splice%28maxItems%20-%202%2C%20tempPermissions.length%20-%20maxItems%20+%201%2C%20%22%u2026%22%29%3B%0A%09%09%09let%20pm%20%3D%20this.pm%3B%0A%09%09%09removeItem.tooltipText%20%3D%20tempPermissions.map%28function%28permission%29%20%7B%0A%09%09%09%09if%28typeof%20permission%20%3D%3D%20%22string%22%29%0A%09%09%09%09%09return%20permission%3B%0A%09%09%09%09var%20action%20%3D%20%22%3F%3F%3F%22%3B%0A%09%09%09%09switch%28permission.capability%29%20%7B%0A%09%09%09%09%09case%20pm.ALLOW_ACTION%3A%20action%20%3D%20%22allowLabel%22%3B%20break%3B%0A%09%09%09%09%09case%20pm.DENY_ACTION%3A%20%20action%20%3D%20%22denyLabel%22%3B%0A%09%09%09%09%7D%0A%09%09%09%09return%20permission.host%20+%20%22%3A%20%22%20+%20_localize%28action%29.toLowerCase%28%29%3B%0A%09%09%09%7D%29.join%28%22%2C%20%5Cn%22%29%3B%0A%09%09%7D%0A%0A%09%09this.updToggleBlockItem%28%29%3B%0A%0A%09%09return%20true%3B%0A%09%7D%2C%0A%09updToggleBlockItem%3A%20function%28%29%20%7B%0A%09%09if%28%21this.mp%29%20//%20Context%20menu%20not%20yet%20created%0A%09%09%09return%3B%0A%09%09this.mp.getElementsByAttribute%28%22cb_id%22%2C%20%22toggleBlock%22%29%5B0%5D%0A%09%09%09.setAttribute%28%0A%09%09%09%09%22checked%22%2C%0A%09%09%09%09this.options.showDefaultPolicy%0A%09%09%09%09%09%3F%20this.defaultDeny%0A%09%09%09%09%09%3A%20this.prefs.get%28%29%0A%09%09%09%29%3B%0A%09%7D%2C%0A%09toggleBlock%3A%20function%28block%29%20%7B%0A%09%09this.prefs.set%28block%29%3B%0A%09%7D%2C%0A%0A%09openPermissions%3A%20function%28%29%20%7B%0A%09%09var%20host%20%3D%20this.options.useBaseDomain.openPermissions%0A%09%09%09%3F%20this.currentBaseDomain%0A%09%09%09%3A%20this.currentHost%3B%0A%0A%09%09if%28this.isSeaMonkey%29%20%7B%0A%09%09%09this.openPermissionsSM%28host%29%3B%0A%09%09%09return%3B%0A%09%09%7D%0A%0A%09%09//%20chrome%3A//browser/content/preferences/privacy.js%0A%09%09//%20Like%20gPrivacyPane.showCookieExceptions%28%29%0A%09%09var%20params%20%3D%20%7B%20blockVisible%20%20%20%3A%20true%2C%0A%09%09%09%09%09%20%20%20sessionVisible%20%3A%20false%2C%0A%09%09%09%09%09%20%20%20allowVisible%20%20%20%3A%20true%2C%0A%09%09%09%09%09%20%20%20prefilledHost%20%20%3A%20host%2C%0A%09%09%09%09%09%20%20%20permissionType%20%3A%20this.permissionType%2C%0A%09%09%09%09%09%20%20%20windowTitle%20%20%20%20%3A%20_localize%28%22exceptionsTitle%22%29%2C%0A%09%09%09%09%09%20%20%20introText%20%20%20%20%20%20%3A%20_localize%28%22exceptionsDesc%22%29%20%7D%3B%0A%09%09var%20win%20%3D%20this.wm.getMostRecentWindow%28%22Browser%3APermissions%22%29%3B%0A%09%09if%28%0A%09%09%09win%0A%09%09%09%26%26%20%21this.options.reusePermissionsWindow%0A%09%09%09%26%26%20%22gPermissionManager%22%20in%20win%20%26%26%20win.gPermissionManager._type%20%21%3D%20this.permissionType%0A%09%09%29%0A%09%09%09win%20%3D%20null%3B%0A%09%09var%20_this%20%3D%20this%3B%0A%09%09var%20setFilter%20%3D%20function%20setFilter%28e%29%20%7B%0A%09%09%09e%20%26%26%20win.removeEventListener%28%22load%22%2C%20setFilter%2C%20false%29%3B%0A%09%09%09setTimeout%28function%28%29%20%7B%0A%09%09%09%09_this.setTextboxValue%28win.document.getElementById%28%22url%22%29%2C%20host%2C%20%21%21e%29%3B%0A%09%09%09%7D%2C%200%29%3B%0A%09%09%7D%3B%0A%09%09if%28win%29%20%7B%0A%09%09%09//%20See%20%3Cmethod%20name%3D%22openWindow%22%3E%20in%20chrome%3A//global/content/bindings/preferences.xml%23prefwindow%0A%09%09%09if%28%22initWithParams%22%20in%20win%29%0A%09%09%09%09win.initWithParams%28params%29%3B%0A%09%09%09win.focus%28%29%3B%0A%09%09%09host%20%26%26%20setFilter%28%29%3B%0A%09%09%7D%0A%09%09else%20%7B%0A%09%09%09win%20%3D%20window.openDialog%28%22chrome%3A//browser/content/preferences/permissions.xul%22%2C%20%22_blank%22%2C%20%22%22%2C%20params%29%3B%0A%09%09%09host%20%26%26%20win.addEventListener%28%22load%22%2C%20setFilter%2C%20false%29%3B%0A%09%09%7D%0A%0A%09%09this.tweakWindow%28win%29%3B%0A%09%7D%2C%0A%09openPermissionsSM%3A%20function%28host%29%20%7B%0A%09%09if%28%21this.options.useBaseDomain.openPermissions%29%0A%09%09%09host%20%3D%20this.getBaseDomain%28host%29%3B%0A%0A%09%09//gBrowser.selectedTab%20%3D%20gBrowser.addTab%28%22about%3Adata%22%29%3B%0A%09%09//toDataManager%28%22%7Cpermissions%22%29%3B%0A%09%09//%20See%20chrome%3A//communicator/content/tasksOverlay.js%0A%09%09var%20_this%20%3D%20this%3B%0A%09%09switchToTabHavingURI%28%22about%3Adata%22%2C%20true%2C%20function%28browser%29%20%7B%0A%09%09%09var%20content%20%3D%20browser.contentWindow.wrappedJSObject%3B%0A%09%09%09_this.oSvc.addObserver%28function%20observer%28subject%2C%20topic%2C%20data%29%20%7B%0A%09%09%09%09_this.oSvc.removeObserver%28observer%2C%20topic%29%3B%0A%0A%09%09%09%09var%20gDomains%20%3D%20content.gDomains%3B%0A%09%09%09%09var%20domains%20%3D%20gDomains.displayedDomains%3B%0A%09%09%09%09for%28var%20i%20%3D%200%2C%20l%20%3D%20domains.length%3B%20i%20%3C%20l%3B%20++i%29%20%7B%0A%09%09%09%09%09var%20domain%20%3D%20domains%5Bi%5D%3B%0A%09%09%09%09%09if%28domain.title%20%3D%3D%20host%29%20%7B%0A%09%09%09%09%09%09gDomains.tree.view.selection.select%28i%29%3B%0A%09%09%09%09%09%09break%3B%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%7D%2C%20%22dataman-loaded%22%2C%20false%29%3B%0A%09%09%09content.gDataman.loadView%28%22%7Cpermissions%22%29%3B%0A%09%09%7D%29%3B%0A%09%7D%2C%0A%09tweakWindow%3A%20function%28win%29%20%7B%0A%09%09if%28%22__cbPermissionsTweaked%22%20in%20win%29%0A%09%09%09return%3B%0A%09%09win.__cbPermissionsTweaked%20%3D%20true%3B%0A%09%09function%20keypressHandler%28e%29%20%7B%0A%09%09%09if%28e.keyCode%20%3D%3D%20e.DOM_VK_ESCAPE%29%0A%09%09%09%09win.close%28%29%3B%0A%09%09%7D%0A%09%09win.addEventListener%28%22keypress%22%2C%20keypressHandler%2C%20false%29%3B%0A%09%09win.addEventListener%28%22unload%22%2C%20function%20destroy%28e%29%20%7B%0A%09%09%09var%20win%20%3D%20e.target.defaultView%3B%0A%09%09%09if%28win%20%21%3D%20e.currentTarget%29%0A%09%09%09%09return%3B%0A%09%09%09win.removeEventListener%28e.type%2C%20destroy%2C%20false%29%3B%0A%09%09%09win.removeEventListener%28%22keypress%22%2C%20keypressHandler%2C%20false%29%3B%0A%09%09%7D%2C%20false%29%3B%0A%09%7D%2C%0A%09setTextboxValue%3A%20function%28tb%2C%20val%2C%20onlySelect%29%20%7B%0A%09%09if%28%21tb%29%0A%09%09%09return%3B%0A%09%09if%28%21onlySelect%29%0A%09%09%09tb.value%20%3D%20val%3B%0A%09%09tb.focus%28%29%3B%0A%09%09if%28val%20%26%26%20%22inputField%22%20in%20tb%29%20%7B%0A%09%09%09var%20ifi%20%3D%20tb.inputField%3B%0A%09%09%09switch%28this.options.prefillMode%29%20%7B%0A%09%09%09%09case%200%3A%20ifi.selectionStart%20%3D%20ifi.selectionEnd%20%3D%200%3B%20%20%20%20%20%20%20%20%20%20break%3B%0A%09%09%09%09case%202%3A%20ifi.selectionStart%20%3D%20ifi.selectionEnd%20%3D%20val.length%3B%20break%3B%0A%09%09%09%09default%3A%20tb.select%28%29%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if%28onlySelect%29%0A%09%09%09return%3B%0A%09%09setTimeout%28function%28%29%20%7B%20//%20For%20Browser%3ACookies%20in%20Firefox%2014%0A%09%09%09tb.doCommand%28%29%3B%20//%20Should%20be%20faster%20than%20%22input%22%20emulation%0A%09%09%7D%2C%200%29%3B%0A%09%09var%20evt%20%3D%20document.createEvent%28%22UIEvents%22%29%3B%0A%09%09evt.initUIEvent%28%22input%22%2C%20true%2C%20true%2C%20tb.ownerDocument.defaultView%2C%200%29%3B%0A%09%09tb.dispatchEvent%28evt%29%3B%0A%09%7D%2C%0A%0A%09get%20hasTempPermissions%28%29%20%7B%0A%09%09delete%20this.hasTempPermissions%3B%0A%09%09return%20this.hasTempPermissions%20%3D%20%22EXPIRE_SESSION%22%20in%20this.pm%20%26%26%20this.pm.add.length%20%3E%203%3B%0A%09%7D%2C%0A%09addPermission%3A%20function%28capability%2C%20temporary%29%20%7B%0A%09%09//%20capability%3A%0A%09%09//%20%20this.pm.ALLOW_ACTION%0A%09%09//%20%20this.pm.DENY_ACTION%0A%0A%09%09var%20host%20%3D%20this.options.useBaseDomain.addPermission%0A%09%09%09%3F%20this.currentBaseDomain%0A%09%09%09%3A%20this.currentHost%3B%0A%09%09if%28%21host%29%0A%09%09%09return%3B%0A%0A%09%09if%28temporary%20%26%26%20%21this.hasTempPermissions%29%0A%09%09%09temporary%20%3D%20false%3B%0A%09%09this.updButtonState%28capability%29%3B%20//%20Faster%20than%20ProgressListener%20%2870-80%20ms%20for%20me%29%0A%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09if%28this.hasTempPermissions%29%20try%20%7B%20//%20Can%27t%20change%20expireType...%0A%09%09%09pm.remove%28host%2C%20this.permissionType%29%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%7D%0A%0A%09%09var%20args%20%3D%20%5Bthis.getURI%28host%29%2C%20this.permissionType%2C%20capability%5D%3B%0A%09%09if%28temporary%29%20%7B%0A%09%09%09let%20expire%20%3D%20this.options.tempExpire%3B%0A%09%09%09if%28expire%20%3C%200%29%0A%09%09%09%09args.push%28pm.EXPIRE_SESSION%29%3B%0A%09%09%09else%0A%09%09%09%09args.push%28pm.EXPIRE_TIME%2C%20expire%20+%20Date.now%28%29%29%3B%0A%09%09%7D%0A%09%09pm.add.apply%28pm%2C%20args%29%3B%0A%09%7D%2C%0A%09removePermission%3A%20function%28%29%20%7B%0A%09%09var%20host%20%3D%20this.currentHost%3B%0A%09%09if%28%21host%29%0A%09%09%09return%3B%0A%0A%09%09this.updButtonState%28this.pm.UNKNOWN_ACTION%29%3B%20//%20Faster%20than%20ProgressListener%20%2870-80%20ms%20for%20me%29%0A%0A%09%09var%20uri%20%3D%20this.getURI%28host%29%3B%0A%09%09var%20permission%20%3D%20this.pm.testPermission%28uri%2C%20this.permissionType%29%3B%0A%09%09this.pm.remove%28host%2C%20this.permissionType%29%3B%0A%09%09while%28this.pm.testPermission%28uri%2C%20this.permissionType%29%20%3D%3D%20permission%29%20%7B%0A%09%09%09let%20parentHost%20%3D%20host.replace%28/%5E%5B%5E.%5D*%5C./%2C%20%22%22%29%3B%0A%09%09%09if%28parentHost%20%3D%3D%20host%29%0A%09%09%09%09break%3B%0A%09%09%09host%20%3D%20parentHost%3B%0A%09%09%09this.pm.remove%28host%2C%20this.permissionType%29%3B%0A%09%09%7D%0A%09%7D%2C%0A%09togglePermission%3A%20function%28capability%29%20%7B%0A%09%09var%20permission%20%3D%20this.getPermission%28%29%3B%0A%09%09if%28permission%20%3D%3D%20this.PERMISSIONS_NOT_SUPPORTED%29%0A%09%09%09return%3B%0A%09%09if%28permission%20%3D%3D%20capability%29%0A%09%09%09this.removePermission%28%29%3B%0A%09%09else%0A%09%09%09this.addPermission%28capability%29%3B%0A%09%7D%2C%0A%09removeTempPermissions%3A%20function%28onlyGet%29%20%7B%0A%09%09var%20out%20%3D%20onlyGet%20%3F%20%5B%5D%20%3A%20false%3B%0A%09%09if%28%21this.hasTempPermissions%29%0A%09%09%09return%20out%3B%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09var%20enumerator%20%3D%20pm.enumerator%3B%0A%09%09while%28enumerator.hasMoreElements%28%29%29%20%7B%0A%09%09%09let%20permission%20%3D%20enumerator.getNext%28%29%0A%09%09%09%09.QueryInterface%28Components.interfaces.nsIPermission%29%3B%0A%09%09%09if%28%0A%09%09%09%09permission.type%20%3D%3D%20this.permissionType%0A%09%09%09%09%26%26%20permission.expireType%20%21%3D%20pm.EXPIRE_NEVER%0A%09%09%09%29%20%7B%0A%09%09%09%09if%28onlyGet%29%0A%09%09%09%09%09out.push%28permission%29%3B%0A%09%09%09%09else%20%7B%0A%09%09%09%09%09out%20%3D%20true%3B%0A%09%09%09%09%09pm.remove%28permission.host%2C%20this.permissionType%29%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return%20out%3B%0A%09%7D%2C%0A%09getPermission%3A%20function%28%29%20%7B%0A%09%09var%20host%20%3D%20this.currentHost%3B%0A%09%09return%20host%0A%09%09%09%3F%20this.pm.testPermission%28this.getURI%28host%29%2C%20this.permissionType%29%0A%09%09%09%3A%20this.PERMISSIONS_NOT_SUPPORTED%3B%0A%09%7D%2C%0A%09getPermissionEx%3A%20function%28%29%20%7B%0A%09%09//%20Unfortunately%20no%20API%20like%20nsIPermissionManager.testPermission%28%29%0A%09%09//%20for%20temporary%20permissions%0A%09%09var%20host%20%3D%20this.currentHost%3B%0A%09%09if%28%21host%29%0A%09%09%09return%20this.PERMISSIONS_NOT_SUPPORTED%3B%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09var%20matchedPermission%20%3D%20pm.UNKNOWN_ACTION%3B%0A%09%09var%20maxHostLen%20%3D%20-1%3B%0A%09%09var%20enumerator%20%3D%20pm.enumerator%3B%0A%09%09while%28enumerator.hasMoreElements%28%29%29%20%7B%0A%09%09%09let%20permission%20%3D%20enumerator.getNext%28%29%0A%09%09%09%09.QueryInterface%28Components.interfaces.nsIPermission%29%3B%0A%09%09%09if%28permission.type%20%21%3D%20this.permissionType%29%0A%09%09%09%09continue%3B%0A%09%09%09var%20permissionHost%20%3D%20permission.host%3B%0A%09%09%09if%28permissionHost%20%3D%3D%20host%29%0A%09%09%09%09return%20permission%3B%0A%09%09%09var%20hostLen%20%3D%20permissionHost.length%3B%0A%09%09%09if%28%0A%09%09%09%09hostLen%20%3E%20maxHostLen%0A%09%09%09%09%26%26%20host.substr%28-hostLen%20-%201%29%20%3D%3D%20%22.%22%20+%20permissionHost%0A%09%09%09%29%20%7B%0A%09%09%09%09matchedPermission%20%3D%20permission%3B%0A%09%09%09%09maxHostLen%20%3D%20hostLen%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return%20matchedPermission%3B%0A%09%7D%2C%0A%09get%20defaultPermission%28%29%20%7B%0A%09%09return%20this.defaultDeny%0A%09%09%09%3F%20this.pm.DENY_ACTION%0A%09%09%09%3A%20this.pm.ALLOW_ACTION%3B%0A%09%7D%2C%0A%0A%09updButtonState%3A%20function%28permission%29%20%7B%0A%09%09var%20ttAdd%20%3D%20%22%22%3B%0A%09%09if%28permission%20%3D%3D%3D%20undefined%29%20try%20%7B%0A%09%09%09permission%20%3D%20this.getPermission%28%29%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%20//%20See%20this.getURI%28%29%0A%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%09ttAdd%20%3D%20%22%20%5Cn%22%20+%20e%3B%0A%09%09%09permission%20%3D%20this.PERMISSIONS_ERROR%3B%0A%09%09%7D%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09var%20key%3B%0A%09%09switch%28permission%29%20%7B%0A%09%09%09case%20pm.UNKNOWN_ACTION%3A%0A%09%09%09%09key%20%3D%20%22default%22%3B%0A%09%09%09%09if%28this.options.showDefaultPolicy%29%20switch%28this.defaultPermission%29%20%7B%0A%09%09%09%09%09case%20pm.ALLOW_ACTION%3A%20%20%20%20%20%20%20%20key%20%3D%20%22defaultAllow%22%3B%20%20%20%20%20%20%20%20break%3B%0A%09%09%09%09%09case%20pm.DENY_ACTION%3A%20%20%20%20%20%20%20%20%20key%20%3D%20%22defaultDeny%22%3B%0A%09%09%09%09%7D%0A%09%09%09break%3B%0A%09%09%09case%20pm.ALLOW_ACTION%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20key%20%3D%20%22allow%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%09%09%09case%20pm.DENY_ACTION%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20key%20%3D%20%22deny%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%09%09%09case%20this.PERMISSIONS_NOT_SUPPORTED%3A%20key%20%3D%20%22notAvailable%22%3B%20%20%20%20%20%20%20%20break%3B%0A%09%09%09case%20this.PERMISSIONS_ERROR%3A%20%20%20%20%20%20%20%20%20key%20%3D%20%22error%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%09%09%09default%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20key%20%3D%20%22unknown%22%3B%0A%09%09%7D%0A%09%09var%20btn%20%3D%20this.button%3B%0A%09%09var%20attr%20%3D%20%22cb_%22%20+%20this.permissionType%3B%0A%09%09if%28btn.getAttribute%28attr%29%20%3D%3D%20key%29%0A%09%09%09return%3B%0A%09%09btn.disabled%20%3D%20permission%20%3D%3D%20this.PERMISSIONS_NOT_SUPPORTED%3B%0A%09%09btn.setAttribute%28attr%2C%20key%29%3B%0A%09%09btn.tooltipText%20%3D%20_localize%28key%20+%20%22Tooltiptext%22%29%20+%20ttAdd%3B%0A%09%7D%2C%0A%0A%09hasModifier%3A%20function%28e%29%20%7B%0A%09%09return%20e.ctrlKey%20%7C%7C%20e.shiftKey%20%7C%7C%20e.altKey%20%7C%7C%20e.metaKey%3B%0A%09%7D%2C%0A%09parseXULFromString%3A%20function%28xul%29%20%7B%0A%09%09xul%20%3D%20xul.replace%28/%3E%5Cs+%3C/g%2C%20%22%3E%3C%22%29%3B%0A%09%09return%20new%20DOMParser%28%29.parseFromString%28xul%2C%20%22application/xml%22%29.documentElement%3B%0A%09%7D%0A%7D%3B%0A%0A//%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A//%20Styles%0A//%20Use%20icon%20from%20default%20Firefox%20theme%20%28chrome%3A//mozapps/skin/plugins/pluginGeneric-16.png%29%0A//%20and%20Diagona%20icons%20%28http%3A//p.yusukekamiyamane.com/%29%0Athis.image%20%3D%20%22%22%3B%20//%20Styles%20aren%27t%20applied%2C%20if%20button%20has%20%22image%22%20attribute%0Avar%20cssStr%20%3D%20%28%27%5C%0A%09@namespace%20url%28%22http%3A//www.mozilla.org/keymaster/gatekeeper/there.is.only.xul%22%29%3B%5Cn%5C%0A%09@-moz-document%20url%28%22%27%20+%20window.location.href%20+%20%27%22%29%20%7B%5Cn%5C%0A%09%09%25button%25%20%7B%5Cn%5C%0A%09%09%09list-style-image%3A%20url%28%22data%3Aimage/png%3Bbase64%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%3D%22%29%20%21important%3B%5Cn%5C%0A%09%09%09-moz-image-region%3A%20rect%280%2C%2016px%2C%2016px%2C%200%29%20%21important%3B%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22default%22%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2016px%2C%2016px%2C%200%29%20%20%20%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22allow%22%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2032px%2C%2016px%2C%2016px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22allowSession%22%5D%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2048px%2C%2016px%2C%2032px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22deny%22%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2064px%2C%2016px%2C%2048px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22unknown%22%5D%2C%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22error%22%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2080px%2C%2016px%2C%2064px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22notAvailable%22%5D%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2096px%2C%2016px%2C%2080px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22defaultAllow%22%5D%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%2816px%2C%2032px%2C%2032px%2C%2016px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22defaultAllowSession%22%5D%20%7B%20-moz-image-region%3A%20rect%2816px%2C%2048px%2C%2032px%2C%2032px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22defaultDeny%22%5D%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%2816px%2C%2064px%2C%2032px%2C%2048px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09/*%20%22moveToStatusBar%22%20option%20*/%5Cn%5C%0A%09%09%25button%25.custombuttons-insideStatusbarpanel%20%7B%5Cn%5C%0A%09%09%09-moz-appearance%3A%20none%20%21important%3B%5Cn%5C%0A%09%09%09border%3A%20none%20%21important%3B%5Cn%5C%0A%09%09%09margin%3A%200%20%21important%3B%5Cn%5C%0A%09%09%09padding%3A%200%20%21important%3B%5Cn%5C%0A%09%09%09min-width%3A%200%20%21important%3B%5Cn%5C%0A%09%09%09max-width%3A%20none%20%21important%3B%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%09%25button%25.custombuttons-insideStatusbarpanel%20%3E%20.toolbarbutton-icon%20%7B%5Cn%5C%0A%09%09%09margin%3A%200%20%21important%3B%5Cn%5C%0A%09%09%09padding%3A%200%20%21important%3B%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%09%25button%25.custombuttons-insideStatusbarpanel%20%3E%20.toolbarbutton-text%20%7B%5Cn%5C%0A%09%09%09display%3A%20none%20%21important%3B%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%09%25button%25%20.cbTempPermission%20%7B%5Cn%5C%0A%09%09%09font-style%3A%20italic%20%21important%3B%5Cn%5C%0A%09%09%09/*-moz-padding-start%3A%200.7em%20%21important%3B*/%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%7D%27%29%0A%09.replace%28/%25button%25/g%2C%20%22%23%22%20+%20this.id%29%0A%09.replace%28/%25attr%25/g%2C%20%22cb_%22%20+%20this.permissions.permissionType.replace%28/%5B%3A.%5D/g%2C%20%22%5C%5C%24%26%22%29%29%3B%0Avar%20cssURI%20%3D%20this.cssURI%20%3D%20Components.classes%5B%22@mozilla.org/network/io-service%3B1%22%5D%0A%09.getService%28Components.interfaces.nsIIOService%29%0A%09.newURI%28%22data%3Atext/css%2C%22%20+%20encodeURIComponent%28cssStr%29%2C%20null%2C%20null%29%3B%0Avar%20sss%20%3D%20this.sss%20%3D%20Components.classes%5B%22@mozilla.org/content/style-sheet-service%3B1%22%5D%0A%09.getService%28Components.interfaces.nsIStyleSheetService%29%3B%0Aif%28%21sss.sheetRegistered%28cssURI%2C%20sss.USER_SHEET%29%29%0A%09sss.loadAndRegisterSheet%28cssURI%2C%20sss.USER_SHEET%29%3B%0A%0A%0Athis.onDestroy%20%3D%20function%28reason%29%20%7B%0A%09if%28reason%20%3D%3D%20%22update%22%20%7C%7C%20reason%20%3D%3D%20%22delete%22%29%20%7B%0A%09%09let%20sss%20%3D%20this.sss%3B%0A%09%09let%20cssURI%20%3D%20this.cssURI%3B%0A%09%09if%28sss.sheetRegistered%28cssURI%2C%20sss.USER_SHEET%29%29%0A%09%09%09sss.unregisterSheet%28cssURI%2C%20sss.USER_SHEET%29%3B%0A%09%7D%0A%09this.permissions.destroy%28%29%3B%0A%7D%3B%0Athis.permissions.init%28%29%3B%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5Bif%28%21event.target%20%26%26%20%21this.disabled%29%20//%20Button%27s%20hotkey%20pressed%0A%09this.click%28%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

Исходный код, инициализация: pluginsPermissions.js

Отредактировано Infocatcher (07-04-2013 19:52:25)


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№206-12-2012 00:26:51

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 17.0

Re: [CB]Plugins Permissions

Осторожно, это тестовая версия!

Разрабатываемая версия


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№307-12-2012 15:51:09

_iD
Участник
 
Группа: Members
Зарегистрирован: 07-09-2012
Сообщений: 8
UA: Firefox 17.0

Re: [CB]Plugins Permissions

У меня есть 2 предложения:
1.

Infocatcher пишет

Примечание: настройка plugins.click_to_play в about:config должна быть выставлена в true.

добавить в кнопку или автоматическое переключение этой настройки в true, или реализовать ручное переключение этой настройки в true/false.
2. т.к. кнопка, по сути, является более близкой к пользователю альтернативой интерфейсу about:permissions, то логично было бы и иметь возможность через кнопку переключать глобальную настройку (в зависимости от значения которой, браузер будет вести себя соответствующим образом на сайтах, для которых не создано исключений).

И ещё:
Раз уж уже есть cookies permissions, а теперь ещё появился и plugins permissions, то возникают вопросы - а не собираешься ли ты сделать кнопки и для остальных permissions со страницы about:permissions?
И если да, то не думал ли ты о том, что, возможно, было бы лучше их все объединить в одной кнопке?
Правда, тогда возникает проблема: сейчас кнопки являются и индикаторами (через иконку), а если это будет одна кнопка для всех permissions, то индикация потеряется. Чтобы уместить на одной иконке сразу несколько индикаторов, надо будет либо сделать иконку шире, либо ввести какую-то систему кодов, либо отдалить от пользователя индикацию на 1 шаг, убрав её в попап, появляющийся при наведении на кнопку.

Отсутствует

 

№407-12-2012 17:20:05

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 17.0

Re: [CB]Plugins Permissions

_iD пишет

добавить в кнопку или автоматическое переключение этой настройки в true, или реализовать ручное переключение этой настройки в true/false.

Насчет автоматики я не уверен, но галочку в меню вполне можно добавить.
Только вот в виде черного списка совсем не работает, к сожалению.


_iD пишет

а не собираешься ли ты сделать кнопки и для остальных permissions со страницы about:permissions?

Пока не планирую.
Там хоть основной код и одинаковый, времени на переделывание уходит порядочно.
И далеко не все разрешения надо часто переключать. :)
Как бы там ни было, там сейчас более или менее унифицировано, так что переделать не особо сложно, были бы желающие.


_iD пишет

Чтобы уместить на одной иконке сразу несколько индикаторов, надо будет либо сделать иконку шире

И будет это выглядеть как несколько кнопок. :)

_iD пишет

либо ввести какую-то систему кодов

Неудобно, запоминать придется.

_iD пишет

либо отдалить от пользователя индикацию на 1 шаг, убрав её в попап, появляющийся при наведении на кнопку.

Лучше пусть мозилловцы позаимствуют у Google Chrome панельку у значка в адресной строке. :D
Тут вот опять же принципиальных сложностей никаких нет, но нужно время и нужна мотивация. Лично мне все эти настройки нужны довольно редко.
Более того, все эти разрешения уже есть в информации о странице.


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№510-12-2012 13:45:03

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 17.0

Re: [CB]Plugins Permissions

Infocatcher пишет

но галочку в меню вполне можно добавить.

Готово:
Add "Block plugins" checkbox to button's context menu


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№603-03-2013 23:49:18

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 20.0

Re: [CB]Plugins Permissions

Plugins Permissions 0.1.0 (2013-03-02)
[+] В контекстное меню кнопки добавлена галочка «Блокировать плагины» (переключает настройку plugins.click_to_play).
[+] Добавлена поддержка временных исключений.
[*] Улучшено обновление окна исключений при удалении исключений извне (в оригинальном менеджере исключений это не реализовано).
[*] Улучшена производительность при открытии окна: контекстное меню создается только после «запроса» пользователя.


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№704-03-2013 00:13:48

geczu
Участник
 
Группа: Members
Зарегистрирован: 02-11-2012
Сообщений: 244
UA: Firefox 19.0

Re: [CB]Plugins Permissions

А нельзя сделать так же для всех опций со страницы about:permissions, а потом обьединить все в оду кнопку?

Отсутствует

 

№804-03-2013 00:21:06

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 20.0

Re: [CB]Plugins Permissions

geczu
Тут чуть выше это обсуждалось.
Как предполагается объединять кнопки-индикаторы?
И так ли часто надо менять все эти исключения?


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№904-03-2013 01:03:22

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 20.0

Re: [CB]Plugins Permissions

okkamas_knife пишет

интересно в будущем собираются исправить это или нет?:whistle:

Это не «исправлять», это «переделывать». И, мне кажется, вряд ли будут ломать текущую логику работы. Впрочем, что добавят настройки с привязкой к текущему сайту – тоже как-то сомнительно.

okkamas_knife пишет

я когда поставил кнопку в ФФ проверить вышеописанное(то что в симанке такое творится предполагал по работе с изображениями) у меня была пустая страничка и я подсел на измену что кнопка не работает т.к вид был неактивный
поэтому пожелание сделай
либо доп.иконку либо ещё както чтоб было понятно что кнопка работает но просто неактивна
скажем ту же иконку затемнённую но с точкой или тултипом пусть статус выводит что мол включать нечего,для настроек жми пкм.

Там и так особая иконка применяется. :) И она отличается от иконки из настроек кнопки.
И тултип меняется, если уж на то пошло.


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№1007-04-2013 18:11:23

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 20.0

Re: [CB]Plugins Permissions

Plugins Permissions 0.1.1 (2013-04-07)
[x] Подкорректирована работа в Firefox 20 (Gecko 20), см. примечания в описании.


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№1107-04-2013 19:46:22

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 20.0

Re: [CB]Plugins Permissions

Plugins Permissions 0.1.1+ (2013-04-07)
[x] И еще раз подкорректирована работа в Firefox 20 (Gecko 20).


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№1212-01-2014 22:14:27

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 26.0

Re: [CB]Plugins Permissions

Plugins Permissions 0.1.2pre (2014-01-12) (осторожно, это тестовая версия!)
[x] Исправлено открытие настроек разрешений в SeaMonkey (about:data).
[x] Исправлено получение типа разрешения в Firefox 24+ (bug 855613).
[x] Исправлено определение локали браузера в Linux (#20).
[+] Расширены настройки useBaseDomain.*: добавлена возможность только удалять префикс «www.».
[*] Улучшена производительность при переключении вкладок: добавлена небольшая задержка перед обновлением состояния кнопки.


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№1309-07-2015 04:37:00

mahtanoronra
Участник
 
Группа: Members
Зарегистрирован: 08-03-2009
Сообщений: 63
UA: Firefox 38.0

Re: [CB]Plugins Permissions

хочу добавить 2 кнопки ещё для Authorware Web Player и Shockwave for Director
как узнать их имена?
например у вас plugin:flash
а у них как узнать?
"Flash", "Shockwave Flash" а это наверно можно поменять на любые имена?

Отсутствует

 

№1409-07-2015 13:05:54

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 39.0

Re: [CB]Plugins Permissions

mahtanoronra пишет

"Flash", "Shockwave Flash" а это наверно можно поменять на любые имена?

Да, в новых версиях Firefox ищет по имени.
Собственно,

Выделить код

Код:

// Unfortunately since Firefox 20 (Gecko 20) global exclusions doesn't work, only on per-plugin basis.
// So you should change "Flash", "Shockwave Flash" and "plugin:flash" in the source (and create copy
// of this button) to menage other plugins, see "// Rename to use button for another plugin" comments.

Данные можно вывести вот так:

Выделить код

Код:

let res = [];
let pluginHost = Components.classes["@mozilla.org/plugin/host;1"]
    .getService(Components.interfaces.nsIPluginHost);
let tags = pluginHost.getPluginTags();
for(let i = 0, l = tags.length; i < l; ++i) {
    let tag = tags[i];
    let mimeType = tag.getMimeTypes()[0]; // This is string since Firefox 24
    let mimeTypeString = mimeType.type || mimeType;
    permissionType = pluginHost.getPermissionStringForType(mimeTypeString);
    res.push("Name: " + tag.name + "\nType: " + permissionType);
}
alert(res.join("\n\n"));

И потом уже, например, для

Выделить код

Код:

Name: Adobe Acrobat
Type: plugin:nppdf
Выделить код

Код:

// Rename to use button for another plugin
            let pluginName = "Adobe Acrobat";
            permissionType = "plugin:nppdf"; // Fallback value

Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№1506-03-2017 02:47:21

mahtanoronra
Участник
 
Группа: Members
Зарегистрирован: 08-03-2009
Сообщений: 63
UA: Firefox 45.0

Re: [CB]Plugins Permissions

очень странный конфликт
при установки этого расширения
https://addons.mozilla.org/en-us/firefox/addon/errorzilla-plus/ или https://addons.mozilla.org/ru/firefox/addon/autopager-fixed/
не открывается меню по правому клику мыши у кнопки, юзаю последний пререлиз
с Cookies_Permissions та же история меню по правому клику не открывается.
а сама ошибка в консоле такая

Выделить код

Код:

Метка времени: 06.03.2017 3:17:47
Ошибка: NS_ERROR_UNEXPECTED: 
Источник: chrome://custombuttons-context/content/button.js?windowId=Firefox&id=custombuttons-button84@init line 1 > Function
Строка: 982

а из за этого расширения когда нажимаешь на кнопке редактировать в под меню
https://addons.mozilla.org/ru/firefox/addon/stay-open-menu/
открывается пустое окно создание кнопки, помогает включение 3 галочки в настройках расширения.

добавлю что все это после обновления с 38 мозилы до 45. раньше они уживались вместе))

Отредактировано mahtanoronra (06-03-2017 07:29:37)

Отсутствует

 

№1606-03-2017 12:06:24

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 51.0

Re: [CB]Plugins Permissions

mahtanoronra
Похоже, ситуация аналогичная вот этой:
http://custombuttons.sourceforge.net/fo … f=5&t=3720
В Firefox что-то поломали, и теперь в некоторых случаях использование nsIDOMParser ломает весь код, который использует вызовы new DOMParser().


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№1706-03-2017 13:06:49

mahtanoronra
Участник
 
Группа: Members
Зарегистрирован: 08-03-2009
Сообщений: 63
UA: Firefox 45.0

Re: [CB]Plugins Permissions

Infocatcher
возможно...правда фикс из темы не помог

Отсутствует

 

№1806-03-2017 13:11:20

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 51.0

Re: [CB]Plugins Permissions

mahtanoronra
Это надо каждое такое расширение исправить... В старом AutoPager'е точно была такая проблема, в … Fixed, скорее всего, тоже такой же код внутри.


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

№1906-03-2017 13:42:00

mahtanoronra
Участник
 
Группа: Members
Зарегистрирован: 08-03-2009
Сообщений: 63
UA: Firefox 45.0

Re: [CB]Plugins Permissions

Infocatcher
то есть зря я на 45 полез надо было на 38 сидеть..хотя выключил я эти расширения...жаль замены нет на них

Отсутствует

 

№2006-03-2017 13:59:32

Dumby
Участник
 
Группа: Members
Зарегистрирован: 12-08-2012
Сообщений: 2254
UA: Firefox 45.0

Re: [CB]Plugins Permissions

Infocatcher

mahtanoronra пишет

все это после обновления с 38 мозилы

Вроде так работает

Выделить код

Код:

parseXULFromString: function(xul) {
        xul = xul.replace(/>\s+</g, "><");
        try {
            return new DOMParser().parseFromString(xul, "application/xml").documentElement;
        } catch(ex) {
            var dummy = document.createElement("dummy");
            dummy.innerHTML = xul.trim();
            return dummy.firstChild;
        }
    }

Отсутствует

 

№2106-03-2017 14:08:56

mahtanoronra
Участник
 
Группа: Members
Зарегистрирован: 08-03-2009
Сообщений: 63
UA: Firefox 45.0

Re: [CB]Plugins Permissions

Dumby
и правда....проверил.пашет)
проверил на двух кнопках и там и там меню теперь открывается.
а этот код универсальный? его можно применить в другие кнопки где подобные проблемы если возникнут?
вот если вдруг кто не может подправленная.

Выделить код

Код:

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%3EPlugins%20Permissions%3C/name%3E%0A%20%20%3Cimage%3E%3C%21%5BCDATA%5Bdata%3Aimage/png%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAB4klEQVQ4jaWTv24TQRjEf+sz/nNEzmGIk3SQQCwURMFbICGRB0hBHSGegzYICigi8Qq8AQUtLSRyYQmQA8jh7PjO59vd76M428gJiZCY5qSRZnZ25taoKv+D0lli76C3v/vqm9076L24jJvBzBI8eXm847w+732P242lKwxHlgdbDQA+Hg2ZceurUR4E5tnbp2uvAcozp2o12Kmqb2/cWsZ6WG3Br7EB4M7GMpmDGytQUlMRgofAGYNaefPzUcyPnyOiRoV+POH2zSYAne4J16Mq8TCntbLEvbut9XMd1KvlzWYUkqZCpzvCWUMzqtOM6jhr6HRHpKnQjEKuhuXNcx28eZ9eOId1Qpo50lzIrJLmnv3dllm4wrsPn1BAFUQVLyCiiDLlFRGwXhAFaLFgIL4QMzVBAQGjoKKIKiKKUTDyJ93cwE6kEBkQKU70UiQpvoWBUiRbKHH9/uNt8TXyTBgnnuTUMhhY4jgnjnOGA0ty6hgnnizxOFfjWvvR9jxB2v8SJiNPMprgXBF3GuavKIkyGXwN5wbOl4KT/gSf22Kai+aYQr0DysHcQDxllwli/+1hlURBCu20xMCohIjIZbo5jISoBgamP1JQWV6rNNptVR9QbHGp3pjA58PDQ58Pjn8D34QaHZSe1EEAAAAASUVORK5CYII%3D%5D%5D%3E%3C/image%3E%0A%20%20%3Cmode%3E0%3C/mode%3E%0A%20%20%3Cinitcode%3E%3C%21%5BCDATA%5B//%20http%3A//infocatcher.ucoz.net/js/cb/pluginsPermissions.js%0A//%20https%3A//forum.mozilla-russia.org/viewtopic.php%3Fid%3D57303%0A//%20https%3A//github.com/Infocatcher/Custom_Buttons/tree/master/Plugins_Permissions%0A%0A//%20Plugins%20Permissions%20button%20for%20Custom%20Buttons%0A//%20%28code%20for%20%22initialization%22%20section%29%0A%0A//%20%28c%29%20Infocatcher%202012-2015%0A//%20version%200.1.2pre2%20-%202015-09-19%0A%0A//%20Based%20on%20Cookies%20Permissions%20button%0A//%20https%3A//github.com/Infocatcher/Custom_Buttons/tree/master/Cookies_Permissions%0A%0A//%20Note%3A%20plugins.click_to_play%20in%20about%3Aconfig%20%28%22Block%20plugins%22%20checkbox%29%20should%20be%20enabled%0A//%20Unfortunately%20since%20Firefox%2020%20%28Gecko%2020%29%20global%20exclusions%20doesn%27t%20work%2C%20only%20on%20per-plugin%20basis.%0A//%20So%20you%20should%20change%20%22Flash%22%2C%20%22Shockwave%20Flash%22%20and%20%22plugin%3Aflash%22%20in%20the%20source%20%28and%20create%20copy%0A//%20of%20this%20button%29%20to%20menage%20other%20plugins%2C%20see%20%22//%20Rename%20to%20use%20button%20for%20another%20plugin%22%20comments.%0A%0Avar%20options%20%3D%20%7B%0A%09showTempPermissions%3A%20true%2C%20//%20Show%20items%20about%20temporary%20permissions%20%28only%20Gecko%202.0+%29%0A%09tempExpire%3A%20-1%2C%20//%20Type%20of%20temporary%20permissions%0A%09//%20-1%20-%20session%2C%20otherwise%20-%20expire%20after%20given%20time%20%28in%20milliseconds%29%0A%09useBaseDomain%3A%20%7B%0A%09%09//%200%20-%20use%20full%20domain%20name%3A%20addons.mozilla.org%2C%20www.google.com%0A%09%09//%201%20-%20strip%20%22www.%22%20prefix%20from%20full%20domain%20name%3A%20addons.mozilla.org%2C%20google.com%0A%09%09//%202%20-%20use%20top-level%20domains%20%28TLDs%29%3A%20mozilla.org%2C%20google.com%0A%09%09addPermission%3A%201%2C%20//%20Add%20%28and%20toggle%29%20permission%20action%0A%09%09openPermissions%3A%200%2C%20%20//%20Filter%20in%20%22Show%20Exceptions%22%20window%0A%09%7D%2C%0A%09showDefaultPolicy%3A%20true%2C%20//%20Show%20default%20policy%0A%09toggleMode%3A%20Components.interfaces.nsIPermissionManager.ALLOW_ACTION%2C%0A%09//%20ALLOW_ACTION%20or%20DENY_ACTION%0A%09reusePermissionsWindow%3A%20false%2C%20//%20Use%20any%20already%20opened%20permissions%20window%0A%09//%20E.g.%20%22Show%20Exceptions%22%20may%20convert%20%22Exceptions%20-%20Cookies%22%20to%20%22Exceptions%20%u2014%20Plugins%22%0A%09prefillMode%3A%201%2C%20//%200%20-%20move%20caret%20to%20start%2C%201%20-%20select%20all%2C%202%20-%20move%20caret%20to%20end%0A%09moveToStatusBar%3A%20%7B%0A%09%09//%20Move%20button%20to%20Status%20Bar%2C%20only%20for%20SeaMonkey%20or%20Firefox%20%3C%204.0%0A%09%09//%20Be%20careful%2C%20has%20some%20side-effects%20and%20button%20can%27t%20be%20edited%20w/o%20restart%0A%09%09enabled%3A%20false%2C%0A%09%09insertAfter%3A%20%22custombuttons-cookiesPermissionsSBPanel%2Cdownload-monitor%2CpopupIcon%2Cstatusbar-progresspanel%22%0A%09%09//%20Like%20https%3A//developer.mozilla.org/en-US/docs/XUL/Attribute/insertafter%0A%09%09//%20Also%20looks%20for%20nodes%20with%20%22cb_id%22%20attribute%0A%09%7D%0A%7D%3B%0A%0Afunction%20_localize%28sid%29%20%7B%0A%09var%20strings%20%3D%20%7B%0A%09%09//%20Note%3A%20%25p%20will%20be%20replaced%20with%20%22Plugins%22%20%28Firefox%20%3C%2020%29%20or%20plugin%20name%20%28Firefox%20%3E%3D%2020%29%0A%09%09en%3A%20%7B%0A%09%09%09plugins%3A%20%22Plugins%22%2C%0A%09%09%09pluginName%3A%20%22Flash%22%2C%20//%20Rename%20to%20use%20button%20for%20another%20plugin%0A%0A%09%09%09defaultTooltiptext%3A%20%22%25p%3A%20Default%22%2C%0A%09%09%09denyTooltiptext%3A%20%22%25p%3A%20Block%22%2C%0A%09%09%09allowTooltiptext%3A%20%22%25p%3A%20Allow%22%2C%0A%09%09%09notAvailableTooltiptext%3A%20%22%25p%3A%20n/a%22%2C%0A%09%09%09unknownTooltiptext%3A%20%22%25p%3A%20%3F%3F%3F%22%2C%0A%09%09%09errorTooltiptext%3A%20%22%25p%3A%20Error%21%22%2C%0A%0A%09%09%09defaultDenyTooltiptext%3A%20%22%25p%3A%20Block%20%28Default%29%22%2C%0A%09%09%09defaultAllowTooltiptext%3A%20%22%25p%3A%20Allow%20%28Default%29%22%2C%0A%0A%09%09%09defaultLabel%3A%20%22Default%22%2C%0A%09%09%09defaultAccesskey%3A%20%22D%22%2C%0A%09%09%09denyLabel%3A%20%22Block%22%2C%0A%09%09%09denyAccesskey%3A%20%22B%22%2C%0A%09%09%09denyTempLabel%3A%20%22Temporarily%20Block%22%2C%0A%09%09%09denyTempAccesskey%3A%20%22k%22%2C%0A%09%09%09allowLabel%3A%20%22Allow%22%2C%0A%09%09%09allowAccesskey%3A%20%22A%22%2C%0A%09%09%09allowTempLabel%3A%20%22Temporarily%20Allow%22%2C%0A%09%09%09allowTempAccesskey%3A%20%22w%22%2C%0A%0A%09%09%09blockPluginsLabel%3A%20%22Block%20plugins%22%2C%0A%09%09%09blockPluginsAccesskey%3A%20%22c%22%2C%0A%09%09%09removeTempPermissionsLabel%3A%20%22Remove%20Temporary%20Permissions%22%2C%0A%09%09%09removeTempPermissionsAccesskey%3A%20%22T%22%2C%0A%0A%09%09%09showPermissionsLabel%3A%20%22Show%20Exceptions%u2026%22%2C%0A%09%09%09showPermissionsAccesskey%3A%20%22x%22%2C%0A%0A%09%09%09buttonMenu%3A%20%22Button%20Menu%22%2C%0A%09%09%09buttonMenuAccesskey%3A%20%22M%22%2C%0A%0A%09%09%09exceptionsTitle%3A%20%22Exceptions%20-%20%25p%22%2C%0A%09%09%09exceptionsDesc%3A%20%22You%20can%20specify%20which%20websites%20are%20always%20or%20never%20allowed%20to%20%5C%0A%09%09%09%09play%20plugins.%20Type%20the%20exact%20address%20of%20the%20site%20you%20want%20to%20manage%20and%20%5C%0A%09%09%09%09then%20click%20Block%20or%20Allow.%22%0A%09%09%7D%2C%0A%09%09ru%3A%20%7B%0A%09%09%09plugins%3A%20%22%u041F%u043B%u0430%u0433%u0438%u043D%u044B%22%2C%0A%09%09%09pluginName%3A%20%22Flash%22%2C%20//%20Rename%20to%20use%20button%20for%20another%20plugin%0A%0A%09%09%09defaultTooltiptext%3A%20%22%25p%3A%20%u041F%u043E%20%u0443%u043C%u043E%u043B%u0447%u0430%u043D%u0438%u044E%22%2C%0A%09%09%09denyTooltiptext%3A%20%22%25p%3A%20%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%22%2C%0A%09%09%09allowTooltiptext%3A%20%22%25p%3A%20%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%22%2C%0A%09%09%09notAvailableTooltiptext%3A%20%22%25p%3A%20%u043D/%u0434%22%2C%0A%09%09%09unknownTooltiptext%3A%20%22%25p%3A%20%3F%3F%3F%22%2C%0A%09%09%09errorTooltiptext%3A%20%22%25p%3A%20%u041E%u0448%u0438%u0431%u043A%u0430%21%22%2C%0A%0A%09%09%09defaultDenyTooltiptext%3A%20%22%25p%3A%20%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%20%28%u043F%u043E%20%u0443%u043C%u043E%u043B%u0447%u0430%u043D%u0438%u044E%29%22%2C%0A%09%09%09defaultAllowTooltiptext%3A%20%22%25p%3A%20%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%20%28%u043F%u043E%20%u0443%u043C%u043E%u043B%u0447%u0430%u043D%u0438%u044E%29%22%2C%0A%0A%09%09%09defaultLabel%3A%20%22%u041F%u043E%20%u0443%u043C%u043E%u043B%u0447%u0430%u043D%u0438%u044E%22%2C%0A%09%09%09defaultAccesskey%3A%20%22%u0443%22%2C%0A%09%09%09denyLabel%3A%20%22%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%22%2C%0A%09%09%09denyAccesskey%3A%20%22%u0411%22%2C%0A%09%09%09denyTempLabel%3A%20%22%u0412%u0440%u0435%u043C%u0435%u043D%u043D%u043E%20%u0431%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%22%2C%0A%09%09%09denyTempAccesskey%3A%20%22%u043B%22%2C%0A%09%09%09allowLabel%3A%20%22%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%22%2C%0A%09%09%09allowAccesskey%3A%20%22%u0420%22%2C%0A%09%09%09allowTempLabel%3A%20%22%u0412%u0440%u0435%u043C%u0435%u043D%u043D%u043E%20%u0440%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%22%2C%0A%09%09%09allowTempAccesskey%3A%20%22%u0448%22%2C%0A%0A%09%09%09blockPluginsLabel%3A%20%22%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%20%u043F%u043B%u0430%u0433%u0438%u043D%u044B%22%2C%0A%09%09%09blockPluginsAccesskey%3A%20%22%u043A%22%2C%0A%09%09%09removeTempPermissionsLabel%3A%20%22%u0423%u0434%u0430%u043B%u0438%u0442%u044C%20%u0432%u0440%u0435%u043C%u0435%u043D%u043D%u044B%u0435%20%u0438%u0441%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u044F%22%2C%0A%09%09%09removeTempPermissionsAccesskey%3A%20%22%u044B%22%2C%0A%0A%09%09%09showPermissionsLabel%3A%20%22%u041F%u043E%u043A%u0430%u0437%u0430%u0442%u044C%20%u0438%u0441%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u044F%u2026%22%2C%0A%09%09%09showPermissionsAccesskey%3A%20%22%u0438%22%2C%0A%0A%09%09%09buttonMenu%3A%20%22%u041C%u0435%u043D%u044E%20%u043A%u043D%u043E%u043F%u043A%u0438%22%2C%0A%09%09%09buttonMenuAccesskey%3A%20%22%u041C%22%2C%0A%0A%09%09%09exceptionsTitle%3A%20%22%u0418%u0441%u043A%u043B%u044E%u0447%u0435%u043D%u0438%u044F%20%u2014%20%25p%22%2C%0A%09%09%09exceptionsDesc%3A%20%22%u0412%u044B%20%u043C%u043E%u0436%u0435%u0442%u0435%20%u0443%u043A%u0430%u0437%u0430%u0442%u044C%2C%20%u043A%u0430%u043A%u0438%u043C%20%u0432%u0435%u0431-%u0441%u0430%u0439%u0442%u0430%u043C%20%u0440%u0430%u0437%u0440%u0435%u0448%u0435%u043D%u043E%20%u0438%u043B%u0438%20%u0437%u0430%u043F%u0440%u0435%u0449%u0435%u043D%u043E%20%5C%0A%09%09%09%09%u0430%u0432%u0442%u043E%u043C%u0430%u0442%u0438%u0447%u0435%u0441%u043A%u0438%20%u043F%u0440%u043E%u0438%u0433%u0440%u044B%u0432%u0430%u0442%u044C%20%u043F%u043B%u0430%u0433%u0438%u043D%u044B.%20%u0412%u0432%u0435%u0434%u0438%u0442%u0435%20%u0442%u043E%u0447%u043D%u044B%u0439%20%u0430%u0434%u0440%u0435%u0441%20%u0441%u0430%u0439%u0442%u0430%20%u0438%20%u043D%u0430%u0436%u043C%u0438%u0442%u0435%20%5C%0A%09%09%09%09%u043A%u043D%u043E%u043F%u043A%u0443%20%AB%u0411%u043B%u043E%u043A%u0438%u0440%u043E%u0432%u0430%u0442%u044C%BB%20%u0438%u043B%u0438%20%AB%u0420%u0430%u0437%u0440%u0435%u0448%u0438%u0442%u044C%BB.%22%0A%09%09%7D%0A%09%7D%3B%0A%09var%20locale%20%3D%20%28function%28%29%20%7B%0A%09%09var%20prefs%20%3D%20%22Services%22%20in%20window%20%26%26%20Services.prefs%0A%09%09%09%7C%7C%20Components.classes%5B%22@mozilla.org/preferences-service%3B1%22%5D%0A%09%09%09%09.getService%28Components.interfaces.nsIPrefBranch%29%3B%0A%09%09if%28%21prefs.getBoolPref%28%22intl.locale.matchOS%22%29%29%20%7B%0A%09%09%09var%20locale%20%3D%20prefs.getCharPref%28%22general.useragent.locale%22%29%3B%0A%09%09%09if%28locale.substr%280%2C%209%29%20%21%3D%20%22chrome%3A//%22%29%0A%09%09%09%09return%20locale%3B%0A%09%09%7D%0A%09%09return%20Components.classes%5B%22@mozilla.org/chrome/chrome-registry%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIXULChromeRegistry%29%0A%09%09%09.getSelectedLocale%28%22global%22%29%3B%0A%09%7D%29%28%29.match%28/%5E%5Ba-z%5D*/%29%5B0%5D%3B%0A%09_localize%20%3D%20function%28sid%29%20%7B%0A%09%09return%20strings%5Blocale%5D%20%26%26%20strings%5Blocale%5D%5Bsid%5D%20%7C%7C%20strings.en%5Bsid%5D%20%7C%7C%20sid%3B%0A%09%7D%3B%0A%09return%20_localize.apply%28this%2C%20arguments%29%3B%0A%7D%0A%0Athis.onclick%20%3D%20function%28e%29%20%7B%0A%09if%28e.target%20%21%3D%20this%29%0A%09%09return%3B%0A%09var%20btn%20%3D%20e.button%3B%0A%09if%28btn%20%3D%3D%201%20%7C%7C%20btn%20%3D%3D%200%20%26%26%20this.permissions.hasModifier%28e%29%29%0A%09%09this.permissions.openPermissions%28%29%3B%0A%09else%20if%28btn%20%3D%3D%200%29%20%7B%0A%09%09this.permissions.togglePermission%28this.permissions.options.toggleMode%29%3B%0A%09%09//%20Prevent%20%22command%22%20event%20to%20use%20%22command%22%20section%20only%20from%20hotkey%0A%09%09e.preventDefault%28%29%3B%0A%09%09e.stopPropagation%28%29%3B%0A%09%7D%0A%7D%3B%0Aif%28%21this.hasOwnProperty%28%22defaultContextId%22%29%29%0A%09this.defaultContextId%20%3D%20this.getAttribute%28%22context%22%29%20%7C%7C%20%22custombuttons-contextpopup%22%3B%0Athis.oncontextmenu%20%3D%20function%28e%29%20%7B%0A%09if%28e.target%20%21%3D%20this%29%0A%09%09return%3B%0A%09this.permissions.initContextOnce%28%29%3B%0A%09this.setAttribute%28%0A%09%09%22context%22%2C%0A%09%09this.permissions.hasModifier%28e%29%0A%09%09%09%3F%20this.defaultContextId%0A%09%09%09%3A%20this.permissions.mpId%0A%09%29%3B%0A%7D%3B%0A%0Athis.permissions%20%3D%20%7B%0A%09//permissionType%3A%20%22plugins%22%2C%0A%09get%20permissionType%28%29%20%7B%0A%09%09var%20permissionType%20%3D%20%22plugins%22%3B%0A%09%09if%28this.perPluginPermissions%29%20try%20%7B%0A%09%09%09//%20Rename%20to%20use%20button%20for%20another%20plugin%0A%09%09%09let%20pluginName%20%3D%20%22Shockwave%20Flash%22%3B%0A%09%09%09permissionType%20%3D%20%22plugin%3Aflash%22%3B%20//%20Fallback%20value%0A%0A%09%09%09//%20Based%20on%20code%20from%20chrome%3A//browser/content/pageinfo/permissions.js%0A%09%09%09let%20pluginHost%20%3D%20Components.classes%5B%22@mozilla.org/plugin/host%3B1%22%5D%0A%09%09%09%09.getService%28Components.interfaces.nsIPluginHost%29%3B%0A%09%09%09let%20tags%20%3D%20pluginHost.getPluginTags%28%29%3B%0A%09%09%09for%28let%20i%20%3D%200%2C%20l%20%3D%20tags.length%3B%20i%20%3C%20l%3B%20++i%29%20%7B%0A%09%09%09%09let%20tag%20%3D%20tags%5Bi%5D%3B%0A%09%09%09%09if%28tag.name%20%3D%3D%20pluginName%29%20%7B%0A%09%09%09%09%09let%20mimeType%20%3D%20tag.getMimeTypes%28%29%5B0%5D%3B%20//%20This%20is%20string%20since%20Firefox%2024%0A%09%09%09%09%09let%20mimeTypeString%20%3D%20mimeType.type%20%7C%7C%20mimeType%3B%0A%09%09%09%09%09permissionType%20%3D%20pluginHost.getPermissionStringForType%28mimeTypeString%29%3B%0A%09%09%09%09%09break%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%7D%0A%09%09delete%20this.permissionType%3B%0A%09%09return%20this.permissionType%20%3D%20permissionType%3B%0A%09%7D%2C%0A%09get%20pluginName%28%29%20%7B%0A%09%09var%20name%20%3D%20this.perPluginPermissions%0A%09%09%09%3F%20_localize%28%22pluginName%22%29%0A%09%09%09%3A%20_localize%28%22plugins%22%29%3B%0A%09%09delete%20this.pluginName%3B%0A%09%09return%20this.pluginName%20%3D%20name%3B%0A%09%7D%2C%0A%09get%20perPluginPermissions%28%29%20%7B%0A%09%09delete%20this.perPluginPermissions%3B%0A%09%09return%20this.perPluginPermissions%20%3D%20parseFloat%28this.appInfo.platformVersion%29%20%3E%3D%2020%3B%0A%09%7D%2C%0A%09popupClass%3A%20%22cbPluginsPermissionsPopup%22%2C%0A%0A%09button%3A%20this%2C%0A%09options%3A%20options%2C%0A%0A%09PERMISSIONS_NOT_SUPPORTED%3A%20-1%2C%0A%09PERMISSIONS_ERROR%3A%20%20%20%20%20%20%20%20%20-2%2C%0A%0A%09errPrefix%3A%20%22%5BCustom%20Buttons%20%3A%3A%20Plugins%20Permissions%5D%20%22%2C%0A%0A%09get%20pm%28%29%20%7B%0A%09%09delete%20this.pm%3B%0A%09%09return%20this.pm%20%3D%20Components.classes%5B%22@mozilla.org/permissionmanager%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIPermissionManager%29%3B%0A%09%7D%2C%0A%09get%20io%28%29%20%7B%0A%09%09delete%20this.io%3B%0A%09%09return%20this.io%20%3D%20Components.classes%5B%22@mozilla.org/network/io-service%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIIOService%29%3B%0A%09%7D%2C%0A%09get%20oSvc%28%29%20%7B%0A%09%09return%20Components.classes%5B%22@mozilla.org/observer-service%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIObserverService%29%3B%0A%09%7D%2C%0A%09get%20wm%28%29%20%7B%0A%09%09delete%20this.wm%3B%0A%09%09return%20this.wm%20%3D%20Components.classes%5B%22@mozilla.org/appshell/window-mediator%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIWindowMediator%29%3B%0A%09%7D%2C%0A%09get%20tld%28%29%20%7B%0A%09%09delete%20this.tld%3B%0A%09%09return%20this.tld%20%3D%20Components.classes%5B%22@mozilla.org/network/effective-tld-service%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIEffectiveTLDService%29%3B%0A%09%7D%2C%0A%0A%09initialized%3A%20false%2C%0A%09mp%3A%20null%2C%0A%09init%3A%20function%28%29%20%7B%0A%09%09if%28this.initialized%29%0A%09%09%09return%3B%0A%09%09this.initialized%20%3D%20true%3B%0A%0A%09%09if%28this.options.moveToStatusBar.enabled%29%0A%09%09%09this.moveToStatusBar%28%29%3B%0A%0A%09%09var%20dummy%20%3D%20function%28%29%20%7B%7D%3B%0A%09%09this.progressListener%20%3D%20%7B%0A%09%09%09context%3A%20this%2C%0A%09%09%09onStateChange%3A%20dummy%2C%0A%09%09%09onProgressChange%3A%20dummy%2C%0A%09%09%09onLocationChange%3A%20function%28aWebProgress%2C%20aRequest%2C%20aLocation%29%20%7B%0A%09%09%09%09setTimeout%28function%28_this%29%20%7B%0A%09%09%09%09%09_this.context.updButtonState%28%29%3B%0A%09%09%09%09%7D%2C%200%2C%20this%29%3B%0A%09%09%09%7D%2C%0A%09%09%09onStatusChange%3A%20dummy%2C%0A%09%09%09onSecurityChange%3A%20dummy%0A%09%09%7D%3B%0A%09%09gBrowser.addProgressListener%28this.progressListener/*%2C%20Components.interfaces.nsIWebProgress.NOTIFY_LOCATION*/%29%3B%0A%0A%09%09this.permissionsObserver%20%3D%20%7B%0A%09%09%09context%3A%20this%2C%0A%09%09%09observe%3A%20function%28subject%2C%20topic%2C%20data%29%20%7B%0A%09%09%09%09if%28topic%20%21%3D%20%22perm-changed%22%29%0A%09%09%09%09%09return%3B%0A%09%09%09%09var%20permission%20%3D%20subject.QueryInterface%28Components.interfaces.nsIPermission%29%3B%0A%09%09%09%09var%20type%20%3D%20this.context.permissionType%3B%0A%09%09%09%09if%28permission.type%20%21%3D%20type%29%0A%09%09%09%09%09return%3B%0A%09%09%09%09this.context.updButtonState%28%29%3B%0A%09%09%09%09if%28data%20%3D%3D%20%22deleted%22%29%20%7B%0A%09%09%09%09%09//%20See%20chrome%3A//browser/content/preferences/permissions.js%0A%09%09%09%09%09//%20observe%3A%20function%20%28aSubject%2C%20aTopic%2C%20aData%29%0A%09%09%09%09%09let%20win%20%3D%20this.context.wm.getMostRecentWindow%28%22Browser%3APermissions%22%29%3B%0A%09%09%09%09%09if%28win%20%26%26%20%22gPermissionManager%22%20in%20win%20%26%26%20win.gPermissionManager._type%20%3D%3D%20type%29%20%7B%0A%09%09%09%09%09%09let%20pm%20%3D%20win.gPermissionManager%3B%0A%09%09%09%09%09%09let%20perms%20%3D%20pm._permissions%3B%0A%09%09%09%09%09%09for%28let%20i%20%3D%200%2C%20l%20%3D%20perms.length%3B%20i%20%3C%20l%3B%20++i%29%20%7B%0A%09%09%09%09%09%09%09if%28this.context.getPermissionHost%28perms%5Bi%5D%29%20%3D%3D%20this.context.getPermissionHost%28permission%29%29%20%7B%0A%09%09%09%09%09%09%09%09perms.splice%28i%2C%201%29%3B%0A%09%09%09%09%09%09%09%09--pm._view._rowCount%3B%0A%09%09%09%09%09%09%09%09pm._tree.treeBoxObject.rowCountChanged%28i%2C%20-1%29%3B%0A%09%09%09%09%09%09%09%09pm._tree.treeBoxObject.invalidate%28%29%3B%0A%09%09%09%09%09%09%09%09break%3B%0A%09%09%09%09%09%09%09%7D%0A%09%09%09%09%09%09%7D%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%09/*%0A%09%09%09%09if%28this.context.getBaseDomain%28permission.host%29%20%3D%3D%20this.context.currentBaseDomain%29%20%7B%0A%09%09%09%09%09//%20See%20chrome%3A//browser/content/browser.js%0A%09%09%09%09%09var%20pm%20%3D%20this.context.pm%3B%0A%09%09%09%09%09switch%28this.context.getPermission%28%29%29%20%7B%0A%09%09%09%09%09%09case%20pm.DENY_ACTION%3A%0A%09%09%09%09%09%09%09let%20notification%20%3D%20PopupNotifications.getNotification%28%22click-to-play-plugins%22%2C%20gBrowser.selectedBrowser%29%3B%0A%09%09%09%09%09%09%09if%20%28notification%29%0A%09%09%09%09%09%09%09%09notification.remove%28%29%3B%0A%09%09%09%09%09%09%09gPluginHandler._removeClickToPlayOverlays%28content%29%3B%0A%09%09%09%09%09%09break%3B%0A%09%09%09%09%09%09case%20pm.ALLOW_ACTION%3A%0A%09%09%09%09%09%09%09gPluginHandler.activatePlugins%28content%29%3B%0A%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%09*/%0A%09%09%09%7D%0A%09%09%7D%3B%0A%09%09this.oSvc.addObserver%28this.permissionsObserver%2C%20%22perm-changed%22%2C%20false%29%3B%0A%0A%09%09var%20ps%20%3D%20this.prefs%20%3D%20%7B%0A%09%09%09context%3A%20this%2C%0A%09%09%09get%20branch%28%29%20%7B%0A%09%09%09%09delete%20this.branch%3B%0A%09%09%09%09return%20this.branch%20%3D%20Components.classes%5B%22@mozilla.org/preferences-service%3B1%22%5D%0A%09%09%09%09%09.getService%28Components.interfaces.nsIPrefService%29%0A%09%09%09%09%09.getBranch%28%22plugins.click_to_play%22%29%0A%09%09%09%09%09.QueryInterface%28Components.interfaces.nsIPrefBranch2%20%7C%7C%20Components.interfaces.nsIPrefBranch%29%3B%0A%09%09%09%7D%2C%0A%09%09%09get%3A%20function%28name%29%20%7B%0A%09%09%09%09try%20%7B%0A%09%09%09%09%09return%20this.branch.getBoolPref%28name%20%7C%7C%20%22%22%29%3B%0A%09%09%09%09%7D%0A%09%09%09%09catch%28e%29%20%7B%0A%09%09%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%09%09%7D%0A%09%09%09%09return%20false%3B%0A%09%09%09%7D%2C%0A%09%09%09set%3A%20function%28val%2C%20name%29%20%7B%0A%09%09%09%09try%20%7B%0A%09%09%09%09%09this.branch.setBoolPref%28name%20%7C%7C%20%22%22%2C%20val%29%3B%0A%09%09%09%09%7D%0A%09%09%09%09catch%28e%29%20%7B%0A%09%09%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%09%09%7D%0A%09%09%09%7D%2C%0A%09%09%09observe%3A%20function%28subject%2C%20topic%2C%20data%29%20%7B%0A%09%09%09%09if%28topic%20%21%3D%20%22nsPref%3Achanged%22%20%7C%7C%20data%20%21%3D%20%22%22%29%0A%09%09%09%09%09return%3B%0A%09%09%09%09var%20ctx%20%3D%20this.context%3B%0A%09%09%09%09ctx.defaultDeny%20%3D%20this.get%28%29%3B%0A%09%09%09%09ctx.updButtonState%28%29%3B%0A%09%09%09%09ctx.updToggleBlockItem%28%29%3B%0A%09%09%09%7D%0A%09%09%7D%3B%0A%09%09if%28this.options.showDefaultPolicy%29%20%7B%0A%09%09%09this.defaultDeny%20%3D%20ps.get%28%29%3B%0A%09%09%09ps.branch.addObserver%28%22%22%2C%20ps%2C%20false%29%3B%0A%09%09%7D%0A%0A%09%09this.updButtonState%28%29%3B%0A%09%7D%2C%0A%09destroy%3A%20function%28%29%20%7B%0A%09%09if%28%21this.initialized%29%0A%09%09%09return%3B%0A%09%09this.initialized%20%3D%20false%3B%0A%0A%09%09gBrowser.removeProgressListener%28this.progressListener%29%3B%0A%09%09this.oSvc.removeObserver%28this.permissionsObserver%2C%20%22perm-changed%22%29%3B%0A%09%09if%28this.options.showDefaultPolicy%29%0A%09%09%09this.prefs.branch.removeObserver%28%22%22%2C%20this.prefs%29%3B%0A%09%09this.progressListener%20%3D%20this.permissionsObserver%20%3D%20this.prefs%20%3D%20null%3B%0A%09%7D%2C%0A%09initContextOnce%3A%20function%28%29%20%7B%0A%09%09this.initContextOnce%20%3D%20function%28%29%20%7B%7D%3B%0A%0A%09%09this.mpId%20%3D%20this.button.id%20+%20%22-context%22%3B%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09var%20noTempPermissions%20%3D%20%21this.options.showTempPermissions%20%7C%7C%20%21this.hasTempPermissions%3B%0A%09%09var%20mp%20%3D%20this.mp%20%3D%20this.button.appendChild%28this.parseXULFromString%28%27%5C%0A%09%09%09%3Cmenupopup%20xmlns%3D%22http%3A//www.mozilla.org/keymaster/gatekeeper/there.is.only.xul%22%5C%0A%09%09%09%09id%3D%22%27%20+%20this.mpId%20+%20%27%22%5C%0A%09%09%09%09class%3D%22%27%20+%20this.popupClass%20+%20%27%22%5C%0A%09%09%09%09onpopupshowing%3D%22%5C%0A%09%09%09%09%09if%28event.target%20%21%3D%20this%29%5C%0A%09%09%09%09%09%09return%20true%3B%5C%0A%09%09%09%09%09document.popupNode%20%3D%20this.parentNode%3B%5C%0A%09%09%09%09%09return%20this.parentNode.permissions.updMenu%28%29%3B%22%5C%0A%09%09%09%09onpopuphidden%3D%22if%28event.target%20%3D%3D%20this%29%20document.popupNode%20%3D%20null%3B%22%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.UNKNOWN_ACTION%20+%20%27%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.removePermission%28%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22defaultLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22defaultAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuseparator%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.DENY_ACTION%20+%20%27%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.addPermission%28Components.interfaces.nsIPermissionManager.DENY_ACTION%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22denyLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22denyAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.DENY_ACTION%20+%20%27-temp%22%5C%0A%09%09%09%09%09collapsed%3D%22%27%20+%20noTempPermissions%20+%20%27%22%5C%0A%09%09%09%09%09class%3D%22cbTempPermission%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.addPermission%28Components.interfaces.nsIPermissionManager.DENY_ACTION%2C%20true%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22denyTempLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22denyTempAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.ALLOW_ACTION%20+%20%27%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.addPermission%28Components.interfaces.nsIPermissionManager.ALLOW_ACTION%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22allowLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22allowAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%20type%3D%22radio%22%20cb_permission%3D%22%27%20+%20pm.ALLOW_ACTION%20+%20%27-temp%22%5C%0A%09%09%09%09%09collapsed%3D%22%27%20+%20noTempPermissions%20+%20%27%22%5C%0A%09%09%09%09%09class%3D%22cbTempPermission%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.addPermission%28Components.interfaces.nsIPermissionManager.ALLOW_ACTION%2C%20true%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22allowTempLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22allowTempAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuseparator%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%5C%0A%09%09%09%09%09cb_id%3D%22toggleBlock%22%5C%0A%09%09%09%09%09type%3D%22checkbox%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.toggleBlock%28this.getAttribute%28%5C%27checked%5C%27%29%20%3D%3D%20%5C%27true%5C%27%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22blockPluginsLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22blockPluginsAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%5C%0A%09%09%09%09%09cb_id%3D%22removeTempPermissions%22%5C%0A%09%09%09%09%09hidden%3D%22%27%20+%20noTempPermissions%20+%20%27%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.removeTempPermissions%28%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22removeTempPermissionsLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22removeTempPermissionsAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuseparator%20/%3E%5C%0A%09%09%09%09%3Cmenuitem%5C%0A%09%09%09%09%09cb_id%3D%22openPermissions%22%5C%0A%09%09%09%09%09oncommand%3D%22this.parentNode.parentNode.permissions.openPermissions%28%29%3B%22%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22showPermissionsLabel%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22showPermissionsAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%09%3Cmenuseparator%20/%3E%5C%0A%09%09%09%09%3Cmenu%5C%0A%09%09%09%09%09label%3D%22%27%20+%20_localize%28%22buttonMenu%22%29%20+%20%27%22%5C%0A%09%09%09%09%09accesskey%3D%22%27%20+%20_localize%28%22buttonMenuAccesskey%22%29%20+%20%27%22%20/%3E%5C%0A%09%09%09%3C/menupopup%3E%27%0A%09%09%29%29%3B%0A%09%09var%20cbPopup%20%3D%20document.getElementById%28this.button.defaultContextId%29%3B%0A%09%09if%28%21cbPopup%29%0A%09%09%09Components.utils.reportError%28this.errPrefix%20+%20%22cb%20menu%20not%20found%22%29%3B%0A%09%09else%20%7B%0A%09%09%09cbPopup%20%3D%20cbPopup.cloneNode%28true%29%3B%0A%09%09%09let%20id%20%3D%20%22-%22%20+%20this.button.id.match%28/%5Cd*%24/%29%5B0%5D%20+%20%22-cloned%22%3B%0A%09%09%09cbPopup.id%20+%3D%20id%3B%0A%09%09%09Array.prototype.slice.call%28cbPopup.getElementsByAttribute%28%22id%22%2C%20%22*%22%29%29.forEach%28function%28node%29%20%7B%0A%09%09%09%09node.id%20+%3D%20id%3B%0A%09%09%09%7D%29%3B%0A%09%09%09cbPopup.setAttribute%28%0A%09%09%09%09%22onpopupshowing%22%2C%0A%09%09%09%09%27%5C%0A%09%09%09%09var%20btn%20%3D%20document.popupNode%20%3D%20this.parentNode.parentNode.parentNode%3B%5Cn%5C%0A%09%09%09%09custombutton.setContextMenuVisibility%28btn%29%3B%27%0A%09%09%09%29%3B%0A%09%09%09let%20menu%20%3D%20mp.lastChild%3B%0A%09%09%09menu.appendChild%28cbPopup%29%3B%0A%09%09%7D%0A%09%7D%2C%0A%09moveToStatusBar%3A%20function%28%29%20%7B%0A%09%09var%20insPoint%3B%0A%09%09this.options.moveToStatusBar.insertAfter%0A%09%09%09.split%28/%2C%5Cs*/%29%0A%09%09%09.some%28function%28id%29%20%7B%0A%09%09%09%09insPoint%20%3D%20document.getElementsByAttribute%28%22cb_id%22%2C%20id%29%5B0%5D%0A%09%09%09%09%09%7C%7C%20document.getElementById%28id%29%3B%0A%09%09%09%09return%20insPoint%3B%0A%09%09%09%7D%29%3B%0A%09%09if%28%21insPoint%29%0A%09%09%09return%3B%0A%0A%09%09var%20btn%20%3D%20this.button%3B%0A%09%09//%20Make%20%3Ctoolbarbutton%3E%20looks%20like%20%3Cimage%3E%2C%20see%20CSS%0A%09%09btn.className%20+%3D%20%22%20custombuttons-insideStatusbarpanel%22%3B%0A%09%09//%20And%20insert%20it%20into%20%3Cstatusbarpanel%3E%0A%09%09var%20spId%20%3D%20btn.id%20+%20%22-statusbarpanel%22%3B%0A%09%09var%20sp%20%3D%20document.getElementById%28spId%29%3B%0A%09%09sp%20%26%26%20sp.parentNode.removeChild%28sp%29%3B%0A%09%09sp%20%3D%20document.createElement%28%22statusbarpanel%22%29%3B%0A%09%09sp.id%20%3D%20spId%3B%0A%09%09sp.setAttribute%28%22cb_id%22%2C%20%22custombuttons-pluginsPermissionsSBPanel%22%29%3B%0A%09%09sp.appendChild%28btn%29%3B%0A%09%09insPoint.parentNode.insertBefore%28sp%2C%20insPoint.nextSibling%29%3B%0A%09%7D%2C%0A%0A%09get%20currentHost%28%29%20%7B%0A%09%09return%20this.getHostFromBrowser%28gBrowser%29%3B%0A%09%7D%2C%0A%09getHostFromBrowser%3A%20function%28browser%29%20%7B%0A%09%09try%20%7B%0A%09%09%09var%20uri%20%3D%20browser.currentURI%3B%0A%09%09%09if%28%5B%22chrome%22%2C%20%22resource%22%5D.indexOf%28uri.scheme%29%20%21%3D%20-1%29%0A%09%09%09%09return%20%22%22%3B%0A%09%09%09return%20uri.host%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%7D%0A%09%09return%20%22%22%3B%0A%09%7D%2C%0A%09get%20currentBaseDomain%28%29%20%7B%0A%09%09return%20this.getBaseDomain%28this.currentHost%29%3B%0A%09%7D%2C%0A%09get%20currentProtocol%28%29%20%7B%0A%09%09var%20scheme%20%3D%20gBrowser.currentURI.scheme%3B%0A%09%09if%28scheme%20%3D%3D%20%22https%22%29%0A%09%09%09return%20scheme%3B%0A%09%09return%20%22http%22%3B%0A%09%7D%2C%0A%09get%20appInfo%28%29%20%7B%0A%09%09delete%20this.appInfo%3B%0A%09%09return%20this.appInfo%20%3D%20Components.classes%5B%22@mozilla.org/xre/app-info%3B1%22%5D%0A%09%09%09.getService%28Components.interfaces.nsIXULAppInfo%29%3B%0A%09%7D%2C%0A%09get%20isSeaMonkey%28%29%20%7B%0A%09%09delete%20this.isSeaMonkey%3B%0A%09%09return%20this.isSeaMonkey%20%3D%20this.appInfo.name%20%3D%3D%20%22SeaMonkey%22%3B%0A%09%7D%2C%0A%09getHost%3A%20function%28useBaseDomain%2C%20host%29%20%7B%0A%09%09if%28host%20%3D%3D%3D%20undefined%29%0A%09%09%09host%20%3D%20this.currentHost%3B%0A%09%09switch%28useBaseDomain%29%20%7B%0A%09%09%09case%201%3A%20return%20this.stripWww%28host%29%3B%0A%09%09%09case%202%3A%20return%20this.getBaseDomain%28host%29%3B%0A%09%09%7D%0A%09%09return%20host%3B%0A%09%7D%2C%0A%09getURI%3A%20function%28host%29%20%7B%0A%09%09if%28host.indexOf%28%22%3A%22%29%20%21%3D%20-1%20%26%26%20/%5E%5B%3A%5Cda-f.%5D+%24/.test%28host%29%29%20//%20IPv6%0A%09%09%09host%20%3D%20%22%5B%22%20+%20host%20+%20%22%5D%22%3B%0A%09%09host%20%3D%20host.replace%28/%5E%5C./%2C%20%22%22%29%3B%0A%09%09try%20%7B%0A%09%09%09return%20this.io.newURI%28this.currentProtocol%20+%20%22%3A//%22%20+%20host%2C%20null%2C%20null%29%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%09Components.utils.reportError%28this.errPrefix%20+%20%22Invalid%20host%3A%20%5C%22%22%20+%20host%20+%20%22%5C%22%22%29%3B%0A%09%09%09throw%20e%3B%0A%09%09%7D%0A%09%7D%2C%0A%09stripWww%3A%20function%28host%29%20%7B%0A%09%09return%20host%20%26%26%20host.replace%28/%5Ewww%5C./i%2C%20%22%22%29%3B%0A%09%7D%2C%0A%09getBaseDomain%3A%20function%28host%29%20%7B%0A%09%09if%28host%29%20try%20%7B%0A%09%09%09return%20this.tld.getBaseDomainFromHost%28host%29%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%7D%0A%09%09return%20host%3B%0A%09%7D%2C%0A%0A%09showMenu%3A%20function%28e%2C%20isContext%2C%20mp%29%20%7B%0A%09%09document.popupNode%20%3D%20this.button.ownerDocument.popupNode%20%3D%20this.button%3B%0A%09%09if%28%21mp%29%20%7B%0A%09%09%09this.initContextOnce%28%29%3B%0A%09%09%09mp%20%3D%20this.mp%3B%0A%09%09%7D%0A%09%09if%28%22openPopupAtScreen%22%20in%20mp%29%0A%09%09%09mp.openPopupAtScreen%28e.screenX%2C%20e.screenY%2C%20isContext%29%3B%0A%09%09else%0A%09%09%09mp.showPopup%28this%2C%20e.screenX%2C%20e.screenY%2C%20isContext%20%3F%20%22context%22%20%3A%20%22popup%22%2C%20null%2C%20null%29%3B%0A%09%7D%2C%0A%09updMenu%3A%20function%28%29%20%7B%0A%09%09var%20permission%20%3D%20this.options.showTempPermissions%0A%09%09%09%3F%20this.getPermissionEx%28%29%0A%09%09%09%3A%20this.getPermission%28%29%3B%0A%0A%09%09var%20noPermissions%20%3D%20permission%20%3D%3D%20this.PERMISSIONS_NOT_SUPPORTED%3B%0A%09%09Array.prototype.forEach.call%28%0A%09%09%09this.mp.getElementsByAttribute%28%22cb_permission%22%2C%20%22*%22%29%2C%0A%09%09%09function%28mi%29%20%7B%0A%09%09%09%09mi.hidden%20%3D%20noPermissions%3B%0A%09%09%09%09var%20ns%20%3D%20mi.nextSibling%3B%0A%09%09%09%09if%28ns%20%26%26%20ns.localName%20%3D%3D%20%22menuseparator%22%29%0A%09%09%09%09%09ns.hidden%20%3D%20noPermissions%3B%0A%09%09%09%7D%0A%09%09%29%3B%0A%0A%09%09if%28%21noPermissions%29%20%7B%0A%09%09%09let%20cbPermission%20%3D%20permission.capability%20%7C%7C%20permission%3B%0A%09%09%09if%28%0A%09%09%09%09this.options.showTempPermissions%0A%09%09%09%09%26%26%20permission%20instanceof%20Components.interfaces.nsIPermission%0A%09%09%09%09%26%26%20%22expireType%22%20in%20permission%0A%09%09%09%09%26%26%20permission.expireType%20%21%3D%20this.pm.EXPIRE_NEVER%0A%09%09%09%29%0A%09%09%09%09cbPermission%20+%3D%20%22-temp%22%3B%0A%09%09%09let%20mi%20%3D%20this.mp.getElementsByAttribute%28%22cb_permission%22%2C%20cbPermission%29%3B%0A%09%09%09mi.length%20%26%26%20mi%5B0%5D.setAttribute%28%22checked%22%2C%20%22true%22%29%3B%0A%09%09%7D%0A%0A%09%09if%28this.hasTempPermissions%29%20%7B%0A%09%09%09let%20maxItems%20%3D%2010%3B%0A%09%09%09let%20removeItem%20%3D%20this.mp.getElementsByAttribute%28%22cb_id%22%2C%20%22removeTempPermissions%22%29%5B0%5D%3B%0A%09%09%09let%20tempPermissions%20%3D%20this.tempPermissions%3B%0A%09%09%09removeItem.disabled%20%3D%20%21tempPermissions.length%3B%0A%09%09%09if%28tempPermissions.length%20%3E%20maxItems%29%0A%09%09%09%09tempPermissions.splice%28maxItems%20-%202%2C%20tempPermissions.length%20-%20maxItems%20+%201%2C%20%22%u2026%22%29%3B%0A%09%09%09let%20pm%20%3D%20this.pm%3B%0A%09%09%09removeItem.tooltipText%20%3D%20tempPermissions.map%28function%28permission%29%20%7B%0A%09%09%09%09if%28typeof%20permission%20%3D%3D%20%22string%22%29%0A%09%09%09%09%09return%20permission%3B%0A%09%09%09%09var%20action%20%3D%20%22%3F%3F%3F%22%3B%0A%09%09%09%09switch%28permission.capability%29%20%7B%0A%09%09%09%09%09case%20pm.ALLOW_ACTION%3A%20action%20%3D%20%22allowLabel%22%3B%20break%3B%0A%09%09%09%09%09case%20pm.DENY_ACTION%3A%20%20action%20%3D%20%22denyLabel%22%3B%0A%09%09%09%09%7D%0A%09%09%09%09return%20%28permission.host%20%7C%7C%20permission.principal.URI.spec.replace%28/%5C/%24/%2C%20%22%22%29%29%0A%09%09%09%09%09+%20%22%3A%20%22%20+%20_localize%28action%29.toLowerCase%28%29%3B%0A%09%09%09%7D%2C%20this%29.join%28%22%2C%20%5Cn%22%29%3B%0A%09%09%7D%0A%0A%09%09this.updToggleBlockItem%28%29%3B%0A%0A%09%09return%20true%3B%0A%09%7D%2C%0A%09updToggleBlockItem%3A%20function%28%29%20%7B%0A%09%09if%28%21this.mp%29%20//%20Context%20menu%20not%20yet%20created%0A%09%09%09return%3B%0A%09%09this.mp.getElementsByAttribute%28%22cb_id%22%2C%20%22toggleBlock%22%29%5B0%5D%0A%09%09%09.setAttribute%28%0A%09%09%09%09%22checked%22%2C%0A%09%09%09%09this.options.showDefaultPolicy%0A%09%09%09%09%09%3F%20this.defaultDeny%0A%09%09%09%09%09%3A%20this.prefs.get%28%29%0A%09%09%09%29%3B%0A%09%7D%2C%0A%09toggleBlock%3A%20function%28block%29%20%7B%0A%09%09this.prefs.set%28block%29%3B%0A%09%7D%2C%0A%0A%09openPermissions%3A%20function%28%29%20%7B%0A%09%09if%28this.isSeaMonkey%29%20%7B%0A%09%09%09this.openPermissionsSM%28%29%3B%0A%09%09%09return%3B%0A%09%09%7D%0A%09%09var%20host%20%3D%20this.getHost%28this.options.useBaseDomain.openPermissions%29%3B%0A%09%09if%28host%20%26%26%20%22Services%22%20in%20window%20%26%26%20parseFloat%28Services.appinfo.platformVersion%29%20%3E%3D%2042%29%0A%09%09%09host%20%3D%20this.currentProtocol%20+%20%22%3A//%22%20+%20host%3B%0A%09%09//%20chrome%3A//browser/content/preferences/privacy.js%0A%09%09//%20Like%20gPrivacyPane.showCookieExceptions%28%29%0A%09%09var%20params%20%3D%20%7B%20blockVisible%20%20%20%3A%20true%2C%0A%09%09%09%09%09%20%20%20sessionVisible%20%3A%20false%2C%0A%09%09%09%09%09%20%20%20allowVisible%20%20%20%3A%20true%2C%0A%09%09%09%09%09%20%20%20prefilledHost%20%20%3A%20host%2C%0A%09%09%09%09%09%20%20%20permissionType%20%3A%20this.permissionType%2C%0A%09%09%09%09%09%20%20%20windowTitle%20%20%20%20%3A%20_localize%28%22exceptionsTitle%22%29.replace%28%22%25p%22%2C%20this.pluginName%29%2C%0A%09%09%09%09%09%20%20%20introText%20%20%20%20%20%20%3A%20_localize%28%22exceptionsDesc%22%29%20%7D%3B%0A%0A%09%09var%20win%3B%0A%09%09var%20ws%20%3D%20this.wm.getEnumerator%28%22Browser%3APermissions%22%29%3B%0A%09%09while%28ws.hasMoreElements%28%29%29%20%7B%0A%09%09%09win%20%3D%20ws.getNext%28%29%3B%0A%09%09%09if%28%0A%09%09%09%09this.options.reusePermissionsWindow%0A%09%09%09%09%7C%7C%20%22gPermissionManager%22%20in%20win%20%26%26%20win.gPermissionManager._type%20%3D%3D%20this.permissionType%0A%09%09%09%29%0A%09%09%09%09break%3B%0A%09%09%09win%20%3D%20null%3B%0A%09%09%7D%0A%0A%09%09var%20_this%20%3D%20this%3B%0A%09%09var%20setFilter%20%3D%20function%20setFilter%28e%29%20%7B%0A%09%09%09e%20%26%26%20win.removeEventListener%28%22load%22%2C%20setFilter%2C%20false%29%3B%0A%09%09%09setTimeout%28function%28%29%20%7B%0A%09%09%09%09_this.setTextboxValue%28win.document.getElementById%28%22url%22%29%2C%20host%2C%20%21%21e%29%3B%0A%09%09%09%7D%2C%200%29%3B%0A%09%09%7D%3B%0A%09%09if%28win%29%20%7B%0A%09%09%09//%20See%20%3Cmethod%20name%3D%22openWindow%22%3E%20in%20chrome%3A//global/content/bindings/preferences.xml%23prefwindow%0A%09%09%09if%28%22initWithParams%22%20in%20win%29%0A%09%09%09%09win.initWithParams%28params%29%3B%0A%09%09%09win.focus%28%29%3B%0A%09%09%09host%20%26%26%20setFilter%28%29%3B%0A%09%09%7D%0A%09%09else%20%7B%0A%09%09%09win%20%3D%20window.openDialog%28%22chrome%3A//browser/content/preferences/permissions.xul%22%2C%20%22_blank%22%2C%20%22%22%2C%20params%29%3B%0A%09%09%09host%20%26%26%20win.addEventListener%28%22load%22%2C%20setFilter%2C%20false%29%3B%0A%09%09%7D%0A%0A%09%09this.tweakWindow%28win%29%3B%0A%09%7D%2C%0A%09openPermissionsSM%3A%20function%28%29%20%7B%0A%09%09var%20host%20%3D%20this.getBaseDomain%28this.currentHost%29%3B%20//%20Only%20TLDs%20are%20displayed%20in%20the%20list%0A%0A%09%09//gBrowser.selectedTab%20%3D%20gBrowser.addTab%28%22about%3Adata%22%29%3B%0A%09%09//toDataManager%28%22%7Cpermissions%22%29%3B%0A%09%09//%20See%20chrome%3A//communicator/content/tasksOverlay.js%0A%09%09var%20_this%20%3D%20this%3B%0A%09%09switchToTabHavingURI%28%22about%3Adata%22%2C%20true%2C%20function%28browser%29%20%7B%0A%09%09%09var%20win%20%3D%20browser.contentWindow%3B%0A%09%09%09var%20content%20%3D%20win.wrappedJSObject%20%7C%7C%20win%3B%0A%0A%09%09%09function%20selectDomain%28%29%20%7B%0A%09%09%09%09var%20gDomains%20%3D%20content.gDomains%3B%0A%09%09%09%09var%20domains%20%3D%20gDomains.displayedDomains%3B%0A%09%09%09%09for%28var%20i%20%3D%200%2C%20l%20%3D%20domains.length%3B%20i%20%3C%20l%3B%20++i%29%20%7B%0A%09%09%09%09%09var%20domain%20%3D%20domains%5Bi%5D%3B%0A%09%09%09%09%09if%28domain.title%20%3D%3D%20host%29%20%7B%0A%09%09%09%09%09%09gDomains.tree.view.selection.select%28i%29%3B%0A%09%09%09%09%09%09//%20For%20SeaMonkey%202.20a1%0A%09%09%09%09%09%09var%20tab%20%3D%20content.document.getElementById%28%22permissionsTab%22%29%3B%0A%09%09%09%09%09%09if%28tab%20%26%26%20%21tab.disabled%29%0A%09%09%09%09%09%09%09tab.parentNode.selectedItem%20%3D%20tab%3B%0A%09%09%09%09%09%09break%3B%0A%09%09%09%09%09%7D%0A%09%09%09%09%7D%0A%09%09%09%7D%0A%0A%09%09%09var%20smVersion%20%3D%20parseFloat%28_this.appInfo.version%29%3B%0A%09%09%09if%28smVersion%20%3E%3D%202.20%20%26%26%20smVersion%20%3C%3D%202.22%29%20%7B%0A%09%09%09%09var%20ml%20%3D%20content.document.getElementById%28%22typeSelect%22%29%3B%0A%09%09%09%09ml.value%20%3D%20%22Permissions%22%3B%0A%09%09%09%09ml.doCommand%28%29%3B%0A%0A%09%09%09%09var%20gDomains%20%3D%20content.gDomains%3B%0A%09%09%09%09var%20oldDomainsCount%20%3D%20gDomains.displayedDomains.length%3B%0A%09%09%09%09var%20stopWait%20%3D%20Date.now%28%29%20+%205e3%3B%0A%09%09%09%09var%20waitTimer%20%3D%20setTimeout%28function%20wait%28%29%20%7B%0A%09%09%09%09%09var%20newDomainsCount%20%3D%20gDomains.displayedDomains.length%3B%0A%09%09%09%09%09if%28%0A%09%09%09%09%09%09newDomainsCount%20%3E%201%20%26%26%20newDomainsCount%20%3D%3D%20oldDomainsCount%0A%09%09%09%09%09%09%7C%7C%20Date.now%28%29%20%3E%20stopWait%0A%09%09%09%09%09%29%20%7B%0A%09%09%09%09%09%09selectDomain%28%29%3B%0A%09%09%09%09%09%09return%3B%0A%09%09%09%09%09%7D%0A%09%09%09%09%09oldDomainsCount%20%3D%20newDomainsCount%3B%0A%09%09%09%09%09waitTimer%20%3D%20setTimeout%28wait%2C%2020%29%3B%0A%09%09%09%09%7D%2C%2020%29%3B%0A%09%09%09%09return%3B%0A%09%09%09%7D%0A%0A%09%09%09_this.oSvc.addObserver%28function%20observer%28subject%2C%20topic%2C%20data%29%20%7B%0A%09%09%09%09if%28subject%20%21%3D%20win%20%26%26%20subject%20%21%3D%20content%29%0A%09%09%09%09%09return%3B%0A%09%09%09%09_this.oSvc.removeObserver%28observer%2C%20topic%29%3B%0A%09%09%09%09selectDomain%28%29%3B%0A%09%09%09%7D%2C%20%22dataman-loaded%22%2C%20false%29%3B%0A%09%09%09content.gDataman.loadView%28%22%7Cpermissions%22%29%3B%0A%09%09%7D%29%3B%0A%09%7D%2C%0A%09tweakWindow%3A%20function%28win%29%20%7B%0A%09%09if%28%22__cbPermissionsTweaked%22%20in%20win%29%0A%09%09%09return%3B%0A%09%09win.__cbPermissionsTweaked%20%3D%20true%3B%0A%09%09function%20keypressHandler%28e%29%20%7B%0A%09%09%09if%28e.keyCode%20%3D%3D%20e.DOM_VK_ESCAPE%29%0A%09%09%09%09win.close%28%29%3B%0A%09%09%7D%0A%09%09win.addEventListener%28%22keypress%22%2C%20keypressHandler%2C%20false%29%3B%0A%09%09win.addEventListener%28%22unload%22%2C%20function%20destroy%28e%29%20%7B%0A%09%09%09var%20win%20%3D%20e.target.defaultView%3B%0A%09%09%09if%28win%20%21%3D%20e.currentTarget%29%0A%09%09%09%09return%3B%0A%09%09%09win.removeEventListener%28e.type%2C%20destroy%2C%20false%29%3B%0A%09%09%09win.removeEventListener%28%22keypress%22%2C%20keypressHandler%2C%20false%29%3B%0A%09%09%7D%2C%20false%29%3B%0A%09%7D%2C%0A%09setTextboxValue%3A%20function%28tb%2C%20val%2C%20onlySelect%29%20%7B%0A%09%09if%28%21tb%29%0A%09%09%09return%3B%0A%09%09if%28%21onlySelect%29%0A%09%09%09tb.value%20%3D%20val%3B%0A%09%09tb.focus%28%29%3B%0A%09%09if%28val%20%26%26%20%22inputField%22%20in%20tb%29%20%7B%0A%09%09%09let%20ifi%20%3D%20tb.inputField%3B%0A%09%09%09switch%28this.options.prefillMode%29%20%7B%0A%09%09%09%09case%200%3A%20ifi.selectionStart%20%3D%20ifi.selectionEnd%20%3D%200%3B%20%20%20%20%20%20%20%20%20%20break%3B%0A%09%09%09%09case%202%3A%20ifi.selectionStart%20%3D%20ifi.selectionEnd%20%3D%20val.length%3B%20break%3B%0A%09%09%09%09default%3A%20tb.select%28%29%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09if%28onlySelect%29%0A%09%09%09return%3B%0A%09%09setTimeout%28function%28%29%20%7B%20//%20For%20Browser%3ACookies%20in%20Firefox%2014%0A%09%09%09tb.doCommand%28%29%3B%20//%20Should%20be%20faster%20than%20%22input%22%20emulation%0A%09%09%7D%2C%200%29%3B%0A%09%09var%20evt%20%3D%20document.createEvent%28%22UIEvents%22%29%3B%0A%09%09evt.initUIEvent%28%22input%22%2C%20true%2C%20true%2C%20tb.ownerDocument.defaultView%2C%200%29%3B%0A%09%09tb.dispatchEvent%28evt%29%3B%0A%09%7D%2C%0A%0A%09get%20hasTempPermissions%28%29%20%7B%0A%09%09delete%20this.hasTempPermissions%3B%0A%09%09return%20this.hasTempPermissions%20%3D%20%22EXPIRE_SESSION%22%20in%20this.pm%20%26%26%20this.pm.add.length%20%3E%203%3B%0A%09%7D%2C%0A%09addPermission%3A%20function%28capability%2C%20temporary%29%20%7B%0A%09%09//%20capability%3A%0A%09%09//%20%20this.pm.ALLOW_ACTION%0A%09%09//%20%20this.pm.DENY_ACTION%0A%0A%09%09var%20host%20%3D%20this.getHost%28this.options.useBaseDomain.addPermission%29%3B%0A%09%09if%28%21host%29%0A%09%09%09return%3B%0A%0A%09%09if%28temporary%20%26%26%20%21this.hasTempPermissions%29%0A%09%09%09temporary%20%3D%20false%3B%0A%09%09this.updButtonState%28capability%29%3B%20//%20Faster%20than%20ProgressListener%20%2870-80%20ms%20for%20me%29%0A%0A%09%09if%28this.hasTempPermissions%29%0A%09%09%09this.removePermissionForHost%28host%29%3B%0A%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09var%20args%20%3D%20%5Bthis.getURI%28host%29%2C%20this.permissionType%2C%20capability%5D%3B%0A%09%09if%28temporary%29%20%7B%0A%09%09%09let%20expire%20%3D%20this.options.tempExpire%3B%0A%09%09%09if%28expire%20%3C%200%29%0A%09%09%09%09args.push%28pm.EXPIRE_SESSION%29%3B%0A%09%09%09else%0A%09%09%09%09args.push%28pm.EXPIRE_TIME%2C%20expire%20+%20Date.now%28%29%29%3B%0A%09%09%7D%0A%09%09pm.add.apply%28pm%2C%20args%29%3B%0A%09%7D%2C%0A%09removePermission%3A%20function%28%29%20%7B%0A%09%09var%20host%20%3D%20this.currentHost%3B%0A%09%09if%28%21host%29%0A%09%09%09return%3B%0A%0A%09%09this.updButtonState%28this.pm.UNKNOWN_ACTION%29%3B%20//%20Faster%20than%20ProgressListener%20%2870-80%20ms%20for%20me%29%0A%0A%09%09var%20uri%20%3D%20this.getURI%28host%29%3B%0A%09%09var%20permission%20%3D%20this.pm.testPermission%28uri%2C%20this.permissionType%29%3B%0A%09%09this.removePermissionForHost%28host%29%3B%0A%09%09while%28this.pm.testPermission%28uri%2C%20this.permissionType%29%20%3D%3D%20permission%29%20%7B%0A%09%09%09let%20parentHost%20%3D%20host.replace%28/%5E%5B%5E.%5D*%5C./%2C%20%22%22%29%3B%0A%09%09%09if%28parentHost%20%3D%3D%20host%29%0A%09%09%09%09break%3B%0A%09%09%09host%20%3D%20parentHost%3B%0A%09%09%09this.removePermissionForHost%28host%29%3B%0A%09%09%7D%0A%09%7D%2C%0A%09togglePermission%3A%20function%28capability%29%20%7B%0A%09%09var%20permission%20%3D%20this.getPermission%28%29%3B%0A%09%09if%28permission%20%3D%3D%20this.PERMISSIONS_NOT_SUPPORTED%29%0A%09%09%09return%3B%0A%09%09if%28permission%20%3D%3D%20capability%29%0A%09%09%09this.removePermission%28%29%3B%0A%09%09else%0A%09%09%09this.addPermission%28capability%29%3B%0A%09%7D%2C%0A%09get%20tempPermissions%28%29%20%7B%0A%09%09var%20out%20%3D%20%5B%5D%3B%0A%09%09if%28%21this.hasTempPermissions%29%0A%09%09%09return%20out%3B%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09var%20enumerator%20%3D%20pm.enumerator%3B%0A%09%09while%28enumerator.hasMoreElements%28%29%29%20%7B%0A%09%09%09let%20permission%20%3D%20enumerator.getNext%28%29%0A%09%09%09%09.QueryInterface%28Components.interfaces.nsIPermission%29%3B%0A%09%09%09if%28%0A%09%09%09%09permission.type%20%3D%3D%20this.permissionType%0A%09%09%09%09%26%26%20permission.expireType%20%21%3D%20pm.EXPIRE_NEVER%0A%09%09%09%29%0A%09%09%09%09out.push%28permission%29%3B%0A%09%09%7D%0A%09%09return%20out%3B%0A%09%7D%2C%0A%09removeTempPermissions%3A%20function%28%29%20%7B%0A%09%09this.tempPermissions.forEach%28this.removeRawPermission%2C%20this%29%3B%0A%09%7D%2C%0A%09getPermission%3A%20function%28%29%20%7B%0A%09%09var%20host%20%3D%20this.currentHost%3B%0A%09%09return%20host%0A%09%09%09%3F%20this.pm.testPermission%28this.getURI%28host%29%2C%20this.permissionType%29%0A%09%09%09%3A%20this.PERMISSIONS_NOT_SUPPORTED%3B%0A%09%7D%2C%0A%09getPermissionEx%3A%20function%28%29%20%7B%0A%09%09//%20Unfortunately%20no%20API%20like%20nsIPermissionManager.testPermission%28%29%0A%09%09//%20for%20temporary%20permissions%0A%09%09var%20host%20%3D%20this.currentHost%3B%0A%09%09if%28%21host%29%0A%09%09%09return%20this.PERMISSIONS_NOT_SUPPORTED%3B%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09var%20matchedPermission%20%3D%20pm.UNKNOWN_ACTION%3B%0A%09%09var%20protocol%20%3D%20this.currentProtocol%3B%0A%09%09var%20maxHostLen%20%3D%20-1%3B%0A%09%09var%20enumerator%20%3D%20pm.enumerator%3B%0A%09%09while%28enumerator.hasMoreElements%28%29%29%20%7B%0A%09%09%09let%20permission%20%3D%20enumerator.getNext%28%29%0A%09%09%09%09.QueryInterface%28Components.interfaces.nsIPermission%29%3B%0A%09%09%09if%28permission.type%20%21%3D%20this.permissionType%29%0A%09%09%09%09continue%3B%0A%09%09%09if%28%22principal%22%20in%20permission%20%26%26%20permission.principal.URI.scheme%20%21%3D%20protocol%29%20//%20Firefox%2042+%0A%09%09%09%09continue%3B%0A%09%09%09var%20permissionHost%20%3D%20this.getPermissionHost%28permission%29%3B%0A%09%09%09if%28permissionHost%20%3D%3D%20host%29%0A%09%09%09%09return%20permission%3B%0A%09%09%09var%20hostLen%20%3D%20permissionHost.length%3B%0A%09%09%09if%28%0A%09%09%09%09hostLen%20%3E%20maxHostLen%0A%09%09%09%09%26%26%20host.substr%28-hostLen%20-%201%29%20%3D%3D%20%22.%22%20+%20permissionHost%0A%09%09%09%29%20%7B%0A%09%09%09%09matchedPermission%20%3D%20permission%3B%0A%09%09%09%09maxHostLen%20%3D%20hostLen%3B%0A%09%09%09%7D%0A%09%09%7D%0A%09%09return%20matchedPermission%3B%0A%09%7D%2C%0A%09removePermissionForHost%3A%20function%28host%29%20%7B%0A%09%09try%20%7B%0A%09%09%09this.pm.remove%28host%2C%20this.permissionType%29%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%0A%09%09%09//%20See%20https%3A//bugzilla.mozilla.org/show_bug.cgi%3Fid%3D1170200%0A%09%09%09if%28%22Services%22%20in%20window%29%20try%20%7B%20//%20Firefox%2042+%0A%09%09%09%09let%20uri%20%3D%20Services.io.newURI%28this.currentProtocol%20+%20%22%3A//%22%20+%20host%2C%20null%2C%20null%29%3B%0A%09%09%09%09this.pm.remove%28uri%2C%20this.permissionType%29%3B%0A%09%09%09%09return%3B%0A%09%09%09%7D%0A%09%09%09catch%28e2%29%20%7B%0A%09%09%09%09Components.utils.reportError%28e2%29%3B%0A%09%09%09%7D%0A%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%7D%0A%09%7D%2C%0A%09removeRawPermission%3A%20function%28permission%29%20%7B%0A%09%09if%28%22principal%22%20in%20permission%29%20//%20Firefox%2042+%0A%09%09%09this.pm.remove%28permission.principal.URI%2C%20this.permissionType%29%3B%0A%09%09else%0A%09%09%09this.removePermissionForHost%28permission.host%29%3B%0A%09%7D%2C%0A%09getPermissionHost%3A%20function%28permission%29%20%7B%0A%09%09if%28%22host%22%20in%20permission%29%0A%09%09%09return%20permission.host%3B%0A%09%09//%20See%20https%3A//bugzilla.mozilla.org/show_bug.cgi%3Fid%3D1173523%0A%09%09return%20permission.principal.URI.host%3B%20//%20Firefox%2042+%0A%09%7D%2C%0A%09get%20defaultPermission%28%29%20%7B%0A%09%09return%20this.defaultDeny%0A%09%09%09%3F%20this.pm.DENY_ACTION%0A%09%09%09%3A%20this.pm.ALLOW_ACTION%3B%0A%09%7D%2C%0A%0A%09updButtonState%3A%20function%28permission%29%20%7B%0A%09%09var%20ttAdd%20%3D%20%22%22%3B%0A%09%09if%28permission%20%3D%3D%3D%20undefined%29%20try%20%7B%0A%09%09%09permission%20%3D%20this.getPermission%28%29%3B%0A%09%09%7D%0A%09%09catch%28e%29%20%7B%20//%20See%20this.getURI%28%29%0A%09%09%09Components.utils.reportError%28e%29%3B%0A%09%09%09ttAdd%20%3D%20%22%20%5Cn%22%20+%20e%3B%0A%09%09%09permission%20%3D%20this.PERMISSIONS_ERROR%3B%0A%09%09%7D%0A%09%09var%20pm%20%3D%20this.pm%3B%0A%09%09var%20key%3B%0A%09%09switch%28permission%29%20%7B%0A%09%09%09case%20pm.UNKNOWN_ACTION%3A%0A%09%09%09%09key%20%3D%20%22default%22%3B%0A%09%09%09%09if%28this.options.showDefaultPolicy%29%20switch%28this.defaultPermission%29%20%7B%0A%09%09%09%09%09case%20pm.ALLOW_ACTION%3A%20%20%20%20%20%20%20%20key%20%3D%20%22defaultAllow%22%3B%20%20%20%20%20%20%20%20break%3B%0A%09%09%09%09%09case%20pm.DENY_ACTION%3A%20%20%20%20%20%20%20%20%20key%20%3D%20%22defaultDeny%22%3B%0A%09%09%09%09%7D%0A%09%09%09break%3B%0A%09%09%09case%20pm.ALLOW_ACTION%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20key%20%3D%20%22allow%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%09%09%09case%20pm.DENY_ACTION%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20key%20%3D%20%22deny%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%09%09%09case%20this.PERMISSIONS_NOT_SUPPORTED%3A%20key%20%3D%20%22notAvailable%22%3B%20%20%20%20%20%20%20%20break%3B%0A%09%09%09case%20this.PERMISSIONS_ERROR%3A%20%20%20%20%20%20%20%20%20key%20%3D%20%22error%22%3B%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20break%3B%0A%09%09%09default%3A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20key%20%3D%20%22unknown%22%3B%0A%09%09%7D%0A%09%09var%20btn%20%3D%20this.button%3B%0A%09%09var%20attr%20%3D%20%22cb_%22%20+%20this.permissionType%3B%0A%09%09if%28btn.getAttribute%28attr%29%20%3D%3D%20key%29%0A%09%09%09return%3B%0A%09%09btn.disabled%20%3D%20permission%20%3D%3D%20this.PERMISSIONS_NOT_SUPPORTED%3B%0A%09%09btn.setAttribute%28attr%2C%20key%29%3B%0A%09%09btn.tooltipText%20%3D%20_localize%28key%20+%20%22Tooltiptext%22%29%0A%09%09%09.replace%28%22%25p%22%2C%20this.pluginName%29%0A%09%09%09+%20ttAdd%3B%0A%09%7D%2C%0A%0A%09hasModifier%3A%20function%28e%29%20%7B%0A%09%09return%20e.ctrlKey%20%7C%7C%20e.shiftKey%20%7C%7C%20e.altKey%20%7C%7C%20e.metaKey%3B%0A%09%7D%2C%0A%20%20%20%20parseXULFromString%3A%20function%28xul%29%20%7B%0A%20%20%20%20%20%20%20%20xul%20%3D%20xul.replace%28/%3E%5Cs+%3C/g%2C%20%22%3E%3C%22%29%3B%0A%20%20%20%20%20%20%20%20try%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20new%20DOMParser%28%29.parseFromString%28xul%2C%20%22application/xml%22%29.documentElement%3B%0A%20%20%20%20%20%20%20%20%7D%20catch%28ex%29%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20dummy%20%3D%20document.createElement%28%22dummy%22%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20dummy.innerHTML%20%3D%20xul.trim%28%29%3B%0A%20%20%20%20%20%20%20%20%20%20%20%20return%20dummy.firstChild%3B%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%7D%3B%0A%0A//%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%3D%0A//%20Styles%0A//%20Use%20icon%20from%20default%20Firefox%20theme%20%28chrome%3A//mozapps/skin/plugins/pluginGeneric-16.png%29%0A//%20and%20Diagona%20icons%20%28http%3A//p.yusukekamiyamane.com/%29%0A%0A//%20Styles%20can%27t%20override%20hardcoded%20icon%0Avar%20icon%20%3D%20this.ownerDocument.getAnonymousElementByAttribute%28this%2C%20%22class%22%2C%20%22toolbarbutton-icon%22%29%3B%0Aif%28icon%29%0A%09icon.src%20%3D%20%22%22%3B%0Aelse%0A%09this.image%20%3D%20%22%22%3B%0A%0Avar%20cssStr%20%3D%20%28%27%5C%0A%09@namespace%20url%28%22http%3A//www.mozilla.org/keymaster/gatekeeper/there.is.only.xul%22%29%3B%5Cn%5C%0A%09@-moz-document%20url%28%22%27%20+%20window.location.href%20+%20%27%22%29%20%7B%5Cn%5C%0A%09%09%25button%25%20%7B%5Cn%5C%0A%09%09%09list-style-image%3A%20url%28%22data%3Aimage/png%3Bbase64%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%3D%22%29%20%21important%3B%5Cn%5C%0A%09%09%09-moz-image-region%3A%20rect%280%2C%2016px%2C%2016px%2C%200%29%20%21important%3B%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22default%22%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2016px%2C%2016px%2C%200%29%20%20%20%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22allow%22%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2032px%2C%2016px%2C%2016px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22allowSession%22%5D%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2048px%2C%2016px%2C%2032px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22deny%22%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2064px%2C%2016px%2C%2048px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22unknown%22%5D%2C%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22error%22%5D%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2080px%2C%2016px%2C%2064px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22notAvailable%22%5D%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%280%2C%2096px%2C%2016px%2C%2080px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22defaultAllow%22%5D%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%2816px%2C%2032px%2C%2032px%2C%2016px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22defaultAllowSession%22%5D%20%7B%20-moz-image-region%3A%20rect%2816px%2C%2048px%2C%2032px%2C%2032px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09%25button%25%5B%25attr%25%3D%22defaultDeny%22%5D%20%20%20%20%20%20%20%20%20%7B%20-moz-image-region%3A%20rect%2816px%2C%2064px%2C%2032px%2C%2048px%29%20%21important%3B%20%7D%5Cn%5C%0A%09%09/*%20%22moveToStatusBar%22%20option%20*/%5Cn%5C%0A%09%09%25button%25.custombuttons-insideStatusbarpanel%20%7B%5Cn%5C%0A%09%09%09-moz-appearance%3A%20none%20%21important%3B%5Cn%5C%0A%09%09%09border%3A%20none%20%21important%3B%5Cn%5C%0A%09%09%09margin%3A%200%20%21important%3B%5Cn%5C%0A%09%09%09padding%3A%200%20%21important%3B%5Cn%5C%0A%09%09%09min-width%3A%200%20%21important%3B%5Cn%5C%0A%09%09%09max-width%3A%20none%20%21important%3B%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%09%25button%25.custombuttons-insideStatusbarpanel%20%3E%20.toolbarbutton-icon%20%7B%5Cn%5C%0A%09%09%09margin%3A%200%20%21important%3B%5Cn%5C%0A%09%09%09padding%3A%200%20%21important%3B%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%09%25button%25.custombuttons-insideStatusbarpanel%20%3E%20.toolbarbutton-text%20%7B%5Cn%5C%0A%09%09%09display%3A%20none%20%21important%3B%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%09%25button%25%20.cbTempPermission%20%7B%5Cn%5C%0A%09%09%09font-style%3A%20italic%20%21important%3B%5Cn%5C%0A%09%09%09/*-moz-padding-start%3A%200.7em%20%21important%3B*/%5Cn%5C%0A%09%09%7D%5Cn%5C%0A%09%7D%27%29%0A%09.replace%28/%25button%25/g%2C%20%22%23%22%20+%20this.id%29%0A%09.replace%28/%25attr%25/g%2C%20%22cb_%22%20+%20this.permissions.permissionType.replace%28/%5B%3A.%5D/g%2C%20%22%5C%5C%24%26%22%29%29%3B%0Avar%20cssURI%20%3D%20this.cssURI%20%3D%20Components.classes%5B%22@mozilla.org/network/io-service%3B1%22%5D%0A%09.getService%28Components.interfaces.nsIIOService%29%0A%09.newURI%28%22data%3Atext/css%2C%22%20+%20encodeURIComponent%28cssStr%29%2C%20null%2C%20null%29%3B%0Avar%20sss%20%3D%20this.sss%20%3D%20Components.classes%5B%22@mozilla.org/content/style-sheet-service%3B1%22%5D%0A%09.getService%28Components.interfaces.nsIStyleSheetService%29%3B%0Aif%28%21sss.sheetRegistered%28cssURI%2C%20sss.USER_SHEET%29%29%0A%09sss.loadAndRegisterSheet%28cssURI%2C%20sss.USER_SHEET%29%3B%0A%0A%0Athis.onDestroy%20%3D%20function%28reason%29%20%7B%0A%09if%28reason%20%3D%3D%20%22update%22%20%7C%7C%20reason%20%3D%3D%20%22delete%22%29%20%7B%0A%09%09let%20sss%20%3D%20this.sss%3B%0A%09%09let%20cssURI%20%3D%20this.cssURI%3B%0A%09%09if%28sss.sheetRegistered%28cssURI%2C%20sss.USER_SHEET%29%29%0A%09%09%09sss.unregisterSheet%28cssURI%2C%20sss.USER_SHEET%29%3B%0A%09%7D%0A%09this.permissions.destroy%28%29%3B%0A%7D%3B%0Athis.permissions.init%28%29%3B%5D%5D%3E%3C/initcode%3E%0A%20%20%3Ccode%3E%3C%21%5BCDATA%5Bif%28%21event.target%20%26%26%20%21this.disabled%29%20//%20Button%27s%20hotkey%20pressed%0A%09this.click%28%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

Отредактировано mahtanoronra (06-03-2017 14:52:10)

Отсутствует

 

№2206-03-2017 22:30:24

Dumby
Участник
 
Группа: Members
Зарегистрирован: 12-08-2012
Сообщений: 2254
UA: Firefox 45.0

Re: [CB]Plugins Permissions

mahtanoronra пишет

а этот код универсальный?

Это я вообще без понятия.

А если насчёт приблизительной границы версий
применительно к кнопке и блоку catch, то у меня так:

FF20 — нормально
FF19 — NS_ERROR_INVALID_POINTER

Отсутствует

 

№2312-03-2017 16:17:18

Infocatcher
Not found
 
Группа: Extensions
Зарегистрирован: 24-05-2007
Сообщений: 4339
UA: Firefox 51.0

Re: [CB]Plugins Permissions

Dumby пишет

Вроде так работает

Спасибо! Я и не знал, что XUL-узлы теперь умеют в .innerHTML.
Там вообще весело... у них жуткий зуд из-за (о, ужас!) синхронного nsIDOMParser.parseFromStream(). Забавно, что синхронно считать поток в строку (и потом распарсить, снова синхронно) – это типа нормально.
Обновил все кнопки: https://github.com/Infocatcher/Custom_B … dfc2439172


Прошлое – это локомотив, который тянет за собой будущее. Бывает, что это прошлое вдобавок чужое. Ты едешь спиной вперед и видишь только то, что уже исчезло. А чтобы сойти с поезда, нужен билет. Ты держишь его в руках. Но кому ты его предъявишь?
Виктор Пелевин. Желтая стрела

Отсутствует

 

Board footer

Powered by PunBB
Modified by Mozilla Russia
Copyright © 2004–2020 Mozilla Russia GitHub mark
Язык отображения форума: [Русский] [English]