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 26 matching lines...) Expand all Loading... |
37 { | 37 { |
38 let {UI} = require("ui"); | 38 let {UI} = require("ui"); |
39 | 39 |
40 return { | 40 return { |
41 label: UI.overlay.attributes.objtabtext, | 41 label: UI.overlay.attributes.objtabtext, |
42 tooltip: UI.overlay.attributes.objtabtooltip, | 42 tooltip: UI.overlay.attributes.objtabtooltip, |
43 classVisibleTop, classVisibleBottom, classHidden | 43 classVisibleTop, classVisibleBottom, classHidden |
44 }; | 44 }; |
45 }); | 45 }); |
46 | 46 |
47 Utils.addChildMessageListener("AdblockPlus:BlockItem", function(item) | 47 Utils.addChildMessageListener("AdblockPlus:BlockItem", function({request, nodesI
D}) |
48 { | 48 { |
49 let {UI} = require("ui"); | 49 let {UI} = require("ui"); |
50 UI.blockItem(UI.currentWindow, null, item); | 50 UI.blockItem(UI.currentWindow, nodesID, request); |
51 }); | 51 }); |
52 | 52 |
53 function init() | 53 function init() |
54 { | 54 { |
55 function processCSSData(event) | 55 function processCSSData(event) |
56 { | 56 { |
57 if (onShutdown.done) | 57 if (onShutdown.done) |
58 return; | 58 return; |
59 | 59 |
60 let data = event.target.responseText; | 60 let data = event.target.responseText; |
(...skipping 26 matching lines...) Expand all Loading... |
87 request.overrideMimeType("text/plain"); | 87 request.overrideMimeType("text/plain"); |
88 request.addEventListener("load", processCSSData, false); | 88 request.addEventListener("load", processCSSData, false); |
89 request.send(null); | 89 request.send(null); |
90 } | 90 } |
91 catch (e) | 91 catch (e) |
92 { | 92 { |
93 Cu.reportError(e); | 93 Cu.reportError(e); |
94 } | 94 } |
95 } | 95 } |
96 init(); | 96 init(); |
OLD | NEW |