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

Side by Side Diff: background.js

Issue 29333133: Issue 3153 - Removed redundant handling of add-subscription message (Closed)
Patch Set: Created Jan. 4, 2016, 3:51 p.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 | options.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-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 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 { 381 {
382 sendResponse({status: "invalid", error: result.errors.join("\n")}); 382 sendResponse({status: "invalid", error: result.errors.join("\n")});
383 break; 383 break;
384 } 384 }
385 385
386 for (var i = 0; i < result.filters.length; i++) 386 for (var i = 0; i < result.filters.length; i++)
387 FilterStorage.addFilter(result.filters[i]); 387 FilterStorage.addFilter(result.filters[i]);
388 388
389 sendResponse({status: "ok"}); 389 sendResponse({status: "ok"});
390 break; 390 break;
391 case "add-subscription":
392 ext.showOptions(function(page)
393 {
394 page.sendMessage(msg);
395 });
396 break;
397 case "add-sitekey": 391 case "add-sitekey":
398 processKey(msg.token, sender.page, sender.frame); 392 processKey(msg.token, sender.page, sender.frame);
399 break; 393 break;
400 case "report-html-page": 394 case "report-html-page":
401 htmlPages.set(sender.page, null); 395 htmlPages.set(sender.page, null);
402 refreshIconAndContextMenu(sender.page); 396 refreshIconAndContextMenu(sender.page);
403 break; 397 break;
404 case "compose-filters": 398 case "compose-filters":
405 sendResponse(composeFilters({ 399 sendResponse(composeFilters({
406 tagName: msg.tagName, 400 tagName: msg.tagName,
(...skipping 23 matching lines...) Expand all
430 } 424 }
431 }); 425 });
432 426
433 // update icon when page changes location 427 // update icon when page changes location
434 ext.pages.onLoading.addListener(function(page) 428 ext.pages.onLoading.addListener(function(page)
435 { 429 {
436 page.sendMessage({type: "clickhide-deactivate"}); 430 page.sendMessage({type: "clickhide-deactivate"});
437 refreshIconAndContextMenu(page); 431 refreshIconAndContextMenu(page);
438 showNextNotificationForUrl(page.url); 432 showNextNotificationForUrl(page.url);
439 }); 433 });
OLDNEW
« no previous file with comments | « no previous file | options.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld