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

Side by Side Diff: options.js

Issue 6528746257383424: Issue 1708 - Integrate first-run page changes in Chrome/Opera/Safari (Closed)
Patch Set: Rebased again Created Dec. 19, 2014, 3:45 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
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2014 Eyeo GmbH 3 * Copyright (C) 2006-2014 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 $(loadOptions); 88 $(loadOptions);
89 89
90 function onMessage(msg) 90 function onMessage(msg)
91 { 91 {
92 switch (msg.type) 92 switch (msg.type)
93 { 93 {
94 case "add-subscription": 94 case "add-subscription":
95 startSubscriptionSelection(msg.title, msg.url); 95 startSubscriptionSelection(msg.title, msg.url);
96 break; 96 break;
97 default:
Sebastian Noack 2014/12/19 17:57:53 While changing this code, mind changing the verbos
Wladimir Palant 2014/12/19 19:38:42 Done.
98 console.log("got unexpected message: " + msg.type);
99 } 97 }
100 }; 98 };
101 99
102 // Reloads the displayed subscriptions and filters 100 // Reloads the displayed subscriptions and filters
103 function reloadFilters() 101 function reloadFilters()
104 { 102 {
105 // Load user filter URLs 103 // Load user filter URLs
106 var container = document.getElementById("filterLists"); 104 var container = document.getElementById("filterLists");
107 while (container.lastChild) 105 while (container.lastChild)
108 container.removeChild(container.lastChild); 106 container.removeChild(container.lastChild);
(...skipping 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 links[i].href = arguments[i + 1]; 645 links[i].href = arguments[i + 1];
648 links[i].setAttribute("target", "_blank"); 646 links[i].setAttribute("target", "_blank");
649 } 647 }
650 else if (typeof arguments[i + 1] == "function") 648 else if (typeof arguments[i + 1] == "function")
651 { 649 {
652 links[i].href = "javascript:void(0);"; 650 links[i].href = "javascript:void(0);";
653 links[i].addEventListener("click", arguments[i + 1], false); 651 links[i].addEventListener("click", arguments[i + 1], false);
654 } 652 }
655 } 653 }
656 } 654 }
OLDNEW
« ext/background.js ('K') | « metadata.common ('k') | safari/ext/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld