diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-06-11 09:52:55 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-06-11 09:52:55 +0200 |
commit | f3e445f6e8587bf40eaa3609bf4f5bea2becdc4a (patch) | |
tree | f61e406b4743187630baf8d1ea1e6496ecd518cb /application/palemoon/components/preferences/aboutPermissions.xml | |
parent | 27783db85a4d3c38b041e51b088ed2dbd35e96c1 (diff) | |
download | UXP-f3e445f6e8587bf40eaa3609bf4f5bea2becdc4a.tar UXP-f3e445f6e8587bf40eaa3609bf4f5bea2becdc4a.tar.gz UXP-f3e445f6e8587bf40eaa3609bf4f5bea2becdc4a.tar.lz UXP-f3e445f6e8587bf40eaa3609bf4f5bea2becdc4a.tar.xz UXP-f3e445f6e8587bf40eaa3609bf4f5bea2becdc4a.zip |
[PALEMOON] Moving About permissions component files from components/preferences/ to components/permissions/
Issue #191
Diffstat (limited to 'application/palemoon/components/preferences/aboutPermissions.xml')
-rw-r--r-- | application/palemoon/components/preferences/aboutPermissions.xml | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/application/palemoon/components/preferences/aboutPermissions.xml b/application/palemoon/components/preferences/aboutPermissions.xml deleted file mode 100644 index 4df0d964d..000000000 --- a/application/palemoon/components/preferences/aboutPermissions.xml +++ /dev/null @@ -1,113 +0,0 @@ -<?xml version="1.0"?> -<!-- This Source Code Form is subject to the terms of the Mozilla Public - - License, v. 2.0. If a copy of the MPL was not distributed with this - - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - -<!DOCTYPE bindings [ -<!ENTITY % aboutPermissionsDTD SYSTEM "chrome://browser/locale/preferences/aboutPermissions.dtd" > -%aboutPermissionsDTD; -]> - -<bindings xmlns="http://www.mozilla.org/xbl" - xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" - xmlns:xbl="http://www.mozilla.org/xbl"> - <binding id="site" extends="chrome://global/content/bindings/richlistbox.xml#richlistitem"> - <content> - <xul:hbox class="site-container" align="center" flex="1"> - <xul:image xbl:inherits="src=favicon" class="site-favicon"/> - <xul:label xbl:inherits="value,selected" class="site-domain" crop="end" flex="1"/> - </xul:hbox> - </content> - </binding> - - <binding id="pluginPermission"> - <content> - <xul:hbox flex="1" align="baseline"> - <xul:label xbl:inherits="value=label" class="plugins-label"/> - <xul:label xbl:inherits="value=vulnerable" class="plugins-vulnerable"/> - <xul:label xbl:inherits="value=default" anonid="plugins-default" class="plugins-default"/> - <xul:spacer flex="1"/> - <xul:menulist anonid="plugins-menulist" - class="pref-menulist" - oncommand="AboutPermissions.onPermissionCommand(event, false);"> - <xul:menupopup> - <xul:menuitem anonid="ask" value="0" label="&permission.alwaysAsk;"/> - <xul:menuitem anonid="allow" value="1" label="&permission.allow;"/> - <xul:menuitem anonid="block" value="2" label="&permission.block;"/> - </xul:menupopup> - </xul:menulist> - <xul:button xbl:inherits="value=set-default" - anonid="plugins-set-default" - class="pref-set-default" - label="&permission.default;" - oncommand="AboutPermissions.onPermissionCommand(event, true);"/> - </xul:hbox> - </content> - <implementation> - <constructor><![CDATA[ - let mimeType = this.getAttribute("mimeType"); - let permString = this.getAttribute("permString"); - let menulist = document.getAnonymousElementByAttribute(this, "anonid", "plugins-menulist"); - menulist.setAttribute("id", permString + "-menulist"); - menulist.setAttribute("mimeType", mimeType); - menulist.setAttribute("type", permString); - let askitem = document.getAnonymousElementByAttribute(this, "anonid", "ask"); - askitem.setAttribute("id", permString + "-0"); - let allowitem = document.getAnonymousElementByAttribute(this, "anonid", "allow"); - allowitem.setAttribute("id", permString + "-1"); - let blockitem = document.getAnonymousElementByAttribute(this, "anonid", "block"); - blockitem.setAttribute("id", permString + "-2"); - let _default = document.getAnonymousElementByAttribute(this, "anonid", "plugins-default"); - this.setDefaultVisibility(false); - _default.setAttribute("value", "*"); - let _setDefault = document.getAnonymousElementByAttribute(this, "anonid", "plugins-set-default"); - _setDefault.setAttribute("id", permString + "-set-default"); - _setDefault.setAttribute("class", "pref-set-default"); - _setDefault.setAttribute("type", permString); - ]]> - </constructor> - <method name="setDefaultVisibility"> - <parameter name="visibility" /> - <body><![CDATA[ - let _default = document.getAnonymousElementByAttribute(this, "anonid", "plugins-default"); - if (visibility) { - _default.style.visibility = "visible"; - } else { - _default.style.visibility = "hidden"; - } - ]]> - </body> - </method> - <method name="isClickToPlay"> - <body><![CDATA[ - let pluginHost = Components.classes["@mozilla.org/plugin/host;1"] - .getService(Components.interfaces.nsIPluginHost); - let mimeType = this.getAttribute("mimeType"); - return (pluginHost.getStateForType(mimeType) - == Components.interfaces.nsIPluginTag.STATE_CLICKTOPLAY); - ]]> - </body> - </method> - <method name="isBlocklisted"> - <body><![CDATA[ - let pluginHost = Components.classes["@mozilla.org/plugin/host;1"] - .getService(Components.interfaces.nsIPluginHost); - let blocklistService = Components.classes["@mozilla.org/extensions/blocklist;1"] - .getService(Components.interfaces.nsIBlocklistService); - let mimeType = this.getAttribute("mimeType"); - let tags = pluginHost.getPluginTags(); - let blocklistState = Components.interfaces.nsIBlocklistService.STATE_NOT_BLOCKED; - for (let plugin of tags) { - if (plugin.getMimeTypes()[0] == mimeType) { - blocklistState = blocklistService.getPluginBlocklistState(plugin); - break; - } - } - return (blocklistState == Components.interfaces.nsIBlocklistService.STATE_VULNERABLE_UPDATE_AVAILABLE || - blocklistState == Components.interfaces.nsIBlocklistService.STATE_VULNERABLE_NO_UPDATE); - ]]> - </body> - </method> - </implementation> - </binding> -</bindings> |