Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: background.js

Issue 29338595: Issue 3829 - Merge add-subscriptions and subscriptions.add messages (Closed)
Left Patch Set: Created March 17, 2016, 9:20 p.m.
Right Patch Set: Addressed comments Created March 18, 2016, 11:34 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | messageResponder.js » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
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
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
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);
LEFTRIGHT

Powered by Google App Engine
This is Rietveld