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 15 matching lines...) Expand all Loading... |
26 let {Prefs} = require("prefs"); | 26 let {Prefs} = require("prefs"); |
27 let {FilterStorage} = require("filterStorage"); | 27 let {FilterStorage} = require("filterStorage"); |
28 let {BlockingFilter, WhitelistFilter} = require("filterClasses"); | 28 let {BlockingFilter, WhitelistFilter} = require("filterClasses"); |
29 let {defaultMatcher} = require("matcher"); | 29 let {defaultMatcher} = require("matcher"); |
30 let {objectMouseEventHander} = require("objectTabs"); | 30 let {objectMouseEventHander} = require("objectTabs"); |
31 let {RequestNotifier} = require("requestNotifier"); | 31 let {RequestNotifier} = require("requestNotifier"); |
32 let {ElemHide} = require("elemHide"); | 32 let {ElemHide} = require("elemHide"); |
33 | 33 |
34 /** | 34 /** |
35 * List of explicitly supported content types | 35 * List of explicitly supported content types |
36 * @type Array of String | 36 * @type string[] |
37 */ | 37 */ |
38 let contentTypes = ["OTHER", "SCRIPT", "IMAGE", "STYLESHEET", "OBJECT", "SUBDOCU
MENT", "DOCUMENT", "XMLHTTPREQUEST", "OBJECT_SUBREQUEST", "FONT", "MEDIA"]; | 38 let contentTypes = ["OTHER", "SCRIPT", "IMAGE", "STYLESHEET", "OBJECT", "SUBDOCU
MENT", "DOCUMENT", "XMLHTTPREQUEST", "OBJECT_SUBREQUEST", "FONT", "MEDIA"]; |
39 | 39 |
40 /** | 40 /** |
41 * List of content types that aren't associated with a visual document area | 41 * List of content types that aren't associated with a visual document area |
42 * @type Array of String | 42 * @type string[] |
43 */ | 43 */ |
44 let nonVisualTypes = ["SCRIPT", "STYLESHEET", "XMLHTTPREQUEST", "OBJECT_SUBREQUE
ST", "FONT"]; | 44 let nonVisualTypes = ["SCRIPT", "STYLESHEET", "XMLHTTPREQUEST", "OBJECT_SUBREQUE
ST", "FONT"]; |
45 | 45 |
46 /** | 46 /** |
47 * Randomly generated class name, to be applied to collapsed nodes. | 47 * Randomly generated class name, to be applied to collapsed nodes. |
48 */ | 48 */ |
49 let collapsedClass = ""; | 49 let collapsedClass = ""; |
50 | 50 |
51 /** | 51 /** |
52 * Public policy checking functions and auxiliary objects | 52 * Public policy checking functions and auxiliary objects |
(...skipping 543 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
596 { | 596 { |
597 if (outer) | 597 if (outer) |
598 throw Cr.NS_ERROR_NO_AGGREGATION; | 598 throw Cr.NS_ERROR_NO_AGGREGATION; |
599 return this.QueryInterface(iid); | 599 return this.QueryInterface(iid); |
600 } | 600 } |
601 }; | 601 }; |
602 PolicyImplementation.init(); | 602 PolicyImplementation.init(); |
603 | 603 |
604 /** | 604 /** |
605 * Nodes scheduled for post-processing (might be null). | 605 * Nodes scheduled for post-processing (might be null). |
606 * @type Array of Node | 606 * @type Node[] |
607 */ | 607 */ |
608 let scheduledNodes = null; | 608 let scheduledNodes = null; |
609 | 609 |
610 /** | 610 /** |
611 * Schedules a node for post-processing. | 611 * Schedules a node for post-processing. |
612 */ | 612 */ |
613 function schedulePostProcess(/**Element*/ node) | 613 function schedulePostProcess(/**Element*/ node) |
614 { | 614 { |
615 if (scheduledNodes) | 615 if (scheduledNodes) |
616 scheduledNodes.push(node); | 616 scheduledNodes.push(node); |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 if (!wnd || wnd.closed) | 786 if (!wnd || wnd.closed) |
787 return; | 787 return; |
788 | 788 |
789 if (entry.type == Policy.type.OBJECT) | 789 if (entry.type == Policy.type.OBJECT) |
790 { | 790 { |
791 node.removeEventListener("mouseover", objectMouseEventHander, true); | 791 node.removeEventListener("mouseover", objectMouseEventHander, true); |
792 node.removeEventListener("mouseout", objectMouseEventHander, true); | 792 node.removeEventListener("mouseout", objectMouseEventHander, true); |
793 } | 793 } |
794 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true)
; | 794 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true)
; |
795 } | 795 } |
OLD | NEW |