OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 Eyeo GmbH |
4 * | 4 * |
5 * Adblock Plus is free software: you can redistribute it and/or modify | 5 * Adblock Plus is free software: you can redistribute it and/or modify |
6 * it under the terms of the GNU General Public License version 3 as | 6 * it under the terms of the GNU General Public License version 3 as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
8 * | 8 * |
9 * Adblock Plus is distributed in the hope that it will be useful, | 9 * Adblock Plus is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 for (let i = 0; i < 20; i++) | 123 for (let i = 0; i < 20; i++) |
124 collapsedClass += String.fromCharCode(offset + Math.random() * 26); | 124 collapsedClass += String.fromCharCode(offset + Math.random() * 26); |
125 | 125 |
126 let collapseStyle = Services.io.newURI("data:text/css," + | 126 let collapseStyle = Services.io.newURI("data:text/css," + |
127 encodeURIComponent("." + collapsedClass + | 127 encodeURIComponent("." + collapsedClass + |
128 "{-moz-binding: url(chrome://global/content/bindings/general.xml#foobarb
azdummy) !important;}"), null, null); | 128 "{-moz-binding: url(chrome://global/content/bindings/general.xml#foobarb
azdummy) !important;}"), null, null); |
129 Utils.styleService.loadAndRegisterSheet(collapseStyle, Ci.nsIStyleSheetServi
ce.USER_SHEET); | 129 Utils.styleService.loadAndRegisterSheet(collapseStyle, Ci.nsIStyleSheetServi
ce.USER_SHEET); |
130 onShutdown.add(function() | 130 onShutdown.add(function() |
131 { | 131 { |
132 Utils.styleService.unregisterSheet(collapseStyle, Ci.nsIStyleSheetService.
USER_SHEET); | 132 Utils.styleService.unregisterSheet(collapseStyle, Ci.nsIStyleSheetService.
USER_SHEET); |
133 }) | 133 }); |
134 }, | 134 }, |
135 | 135 |
136 /** | 136 /** |
137 * Checks whether a node should be blocked, hides it if necessary | 137 * Checks whether a node should be blocked, hides it if necessary |
138 * @param wnd {nsIDOMWindow} | 138 * @param wnd {nsIDOMWindow} |
139 * @param node {nsIDOMElement} | 139 * @param node {nsIDOMElement} |
140 * @param contentType {String} | 140 * @param contentType {String} |
141 * @param location {nsIURI} | 141 * @param location {nsIURI} |
142 * @param collapse {Boolean} true to force hiding of the node | 142 * @param collapse {Boolean} true to force hiding of the node |
143 * @return {Boolean} false if the node should be blocked | 143 * @return {Boolean} false if the node should be blocked |
(...skipping 635 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 if (!wnd || wnd.closed) | 779 if (!wnd || wnd.closed) |
780 return; | 780 return; |
781 | 781 |
782 if (entry.type == Policy.type.OBJECT) | 782 if (entry.type == Policy.type.OBJECT) |
783 { | 783 { |
784 node.removeEventListener("mouseover", objectMouseEventHander, true); | 784 node.removeEventListener("mouseover", objectMouseEventHander, true); |
785 node.removeEventListener("mouseout", objectMouseEventHander, true); | 785 node.removeEventListener("mouseout", objectMouseEventHander, true); |
786 } | 786 } |
787 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true)
; | 787 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true)
; |
788 } | 788 } |
OLD | NEW |