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 295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 rect.right += relLeft; | 306 rect.right += relLeft; |
307 rect.top += relTop; | 307 rect.top += relTop; |
308 rect.bottom += relTop; | 308 rect.bottom += relTop; |
309 } | 309 } |
310 | 310 |
311 return rect; | 311 return rect; |
312 }, | 312 }, |
313 | 313 |
314 doBlock: function() | 314 doBlock: function() |
315 { | 315 { |
316 // TODO: Store this.currentElement for the filter assistant | 316 let {storeNodes} = require("child/contentPolicy"); |
317 sendAsyncMessage("AdblockPlus:BlockItem", this.objtabElement.nodeData); | 317 let nodesID = storeNodes([this.currentElement]); |
| 318 sendAsyncMessage("AdblockPlus:BlockItem", { |
| 319 request: this.objtabElement.nodeData, |
| 320 nodesID |
| 321 }); |
318 }, | 322 }, |
319 | 323 |
320 /** | 324 /** |
321 * Called whenever a timer fires. | 325 * Called whenever a timer fires. |
322 * @param {nsISupport} subject | 326 * @param {nsISupport} subject |
323 * @param {string} topic | 327 * @param {string} topic |
324 * @param {string} data | 328 * @param {string} data |
325 */ | 329 */ |
326 observe: function(subject, topic, data) | 330 observe: function(subject, topic, data) |
327 { | 331 { |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
385 event.stopPropagation(); | 389 event.stopPropagation(); |
386 | 390 |
387 objTabs.doBlock(); | 391 objTabs.doBlock(); |
388 } | 392 } |
389 else if (event.type == "mouseover") | 393 else if (event.type == "mouseover") |
390 objTabs.showTabFor(objTabs.currentElement); | 394 objTabs.showTabFor(objTabs.currentElement); |
391 else if (event.type == "mouseout") | 395 else if (event.type == "mouseout") |
392 objTabs.hideTabFor(objTabs.currentElement); | 396 objTabs.hideTabFor(objTabs.currentElement); |
393 } | 397 } |
394 exports.objectMouseEventHander = objectMouseEventHander; | 398 exports.objectMouseEventHander = objectMouseEventHander; |
OLD | NEW |