Left: | ||
Right: |
LEFT | RIGHT |
---|---|
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-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
330 { | 330 { |
331 // We don't know how long it will take for the page to fully load | 331 // We don't know how long it will take for the page to fully load |
332 // so we'll post the message after one second | 332 // so we'll post the message after one second |
333 setTimeout(function() | 333 setTimeout(function() |
334 { | 334 { |
335 window.postMessage({ | 335 window.postMessage({ |
336 type: "message", | 336 type: "message", |
337 payload: { | 337 payload: { |
338 title: "Custom subscription", | 338 title: "Custom subscription", |
339 url: "http://example.com/custom.txt", | 339 url: "http://example.com/custom.txt", |
340 ask: true, | 340 confirm: true, |
341 type: "subscription.add" | 341 type: "subscriptions.add" |
Thomas Greiner
2016/03/18 10:48:20
The message type is "subscriptions.add".
Sebastian Noack
2016/03/18 11:35:07
Argh, right.
| |
342 } | 342 } |
343 }, "*"); | 343 }, "*"); |
344 }, 1000); | 344 }, 1000); |
345 } | 345 } |
346 | 346 |
347 ext.devtools.onCreated.addListener(function(panel) | 347 ext.devtools.onCreated.addListener(function(panel) |
348 { | 348 { |
349 // blocked request | 349 // blocked request |
350 panel.sendMessage({ | 350 panel.sendMessage({ |
351 type: "add-record", | 351 type: "add-record", |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 }, | 414 }, |
415 filter: { | 415 filter: { |
416 text: "||example.com/some-annoying-popup$popup", | 416 text: "||example.com/some-annoying-popup$popup", |
417 whitelisted: false, | 417 whitelisted: false, |
418 userDefined: true, | 418 userDefined: true, |
419 subscription: null | 419 subscription: null |
420 } | 420 } |
421 }); | 421 }); |
422 }); | 422 }); |
423 })(this); | 423 })(this); |
LEFT | RIGHT |