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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
53 * @class | 53 * @class |
54 */ | 54 */ |
55 let Policy = exports.Policy = | 55 var Policy = exports.Policy = |
56 { | 56 { |
57 /** | 57 /** |
58 * Map of content type identifiers by their name. | 58 * Map of content type identifiers by their name. |
59 * @type Object | 59 * @type Object |
60 */ | 60 */ |
61 type: {}, | 61 type: {}, |
62 | 62 |
63 /** | 63 /** |
64 * Map of content type names by their identifiers (reverse of type map). | 64 * Map of content type names by their identifiers (reverse of type map). |
65 * @type Object | 65 * @type Object |
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
352 for (let node of nodes) | 352 for (let node of nodes) |
353 Utils.runAsync(() => refilterNode(node, entry)); | 353 Utils.runAsync(() => refilterNode(node, entry)); |
354 } | 354 } |
355 }; | 355 }; |
356 Policy.init(); | 356 Policy.init(); |
357 | 357 |
358 /** | 358 /** |
359 * Actual nsIContentPolicy and nsIChannelEventSink implementation | 359 * Actual nsIContentPolicy and nsIChannelEventSink implementation |
360 * @class | 360 * @class |
361 */ | 361 */ |
362 let PolicyImplementation = | 362 var PolicyImplementation = |
363 { | 363 { |
364 classDescription: "Adblock Plus content policy", | 364 classDescription: "Adblock Plus content policy", |
365 classID: Components.ID("cfeaabe6-1dd1-11b2-a0c6-cb5c268894c9"), | 365 classID: Components.ID("cfeaabe6-1dd1-11b2-a0c6-cb5c268894c9"), |
366 contractID: "@adblockplus.org/abp/policy;1", | 366 contractID: "@adblockplus.org/abp/policy;1", |
367 xpcom_categories: ["content-policy", "net-channel-event-sinks"], | 367 xpcom_categories: ["content-policy", "net-channel-event-sinks"], |
368 | 368 |
369 /** | 369 /** |
370 * Registers the content policy on startup. | 370 * Registers the content policy on startup. |
371 */ | 371 */ |
372 init: function() | 372 init: function() |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 if (!wnd || wnd.closed) | 818 if (!wnd || wnd.closed) |
819 return; | 819 return; |
820 | 820 |
821 if (entry.type == Policy.type.OBJECT) | 821 if (entry.type == Policy.type.OBJECT) |
822 { | 822 { |
823 node.removeEventListener("mouseover", objectMouseEventHander, true); | 823 node.removeEventListener("mouseover", objectMouseEventHander, true); |
824 node.removeEventListener("mouseout", objectMouseEventHander, true); | 824 node.removeEventListener("mouseout", objectMouseEventHander, true); |
825 } | 825 } |
826 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true)
; | 826 Policy.processNode(wnd, node, entry.type, Utils.makeURI(entry.location), true)
; |
827 } | 827 } |
OLD | NEW |