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

Side by Side Diff: background.js

Issue 29338595: Issue 3829 - Merge add-subscriptions and subscriptions.add messages (Closed)
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:
View unified diff | Download patch
« no previous file with comments | « no previous file | messageResponder.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 type: "add-subscription" 340 confirm: true,
341 type: "subscriptions.add"
341 } 342 }
342 }, "*"); 343 }, "*");
343 }, 1000); 344 }, 1000);
344 } 345 }
345 346
346 ext.devtools.onCreated.addListener(function(panel) 347 ext.devtools.onCreated.addListener(function(panel)
347 { 348 {
348 // blocked request 349 // blocked request
349 panel.sendMessage({ 350 panel.sendMessage({
350 type: "add-record", 351 type: "add-record",
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 }, 414 },
414 filter: { 415 filter: {
415 text: "||example.com/some-annoying-popup$popup", 416 text: "||example.com/some-annoying-popup$popup",
416 whitelisted: false, 417 whitelisted: false,
417 userDefined: true, 418 userDefined: true,
418 subscription: null 419 subscription: null
419 } 420 }
420 }); 421 });
421 }); 422 });
422 })(this); 423 })(this);
OLDNEW
« no previous file with comments | « no previous file | messageResponder.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld