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

Delta Between Two Patch Sets: options.js

Issue 6528746257383424: Issue 1708 - Integrate first-run page changes in Chrome/Opera/Safari (Closed)
Left Patch Set: Rebased patch Created Dec. 18, 2014, 10:12 p.m.
Right Patch Set: Rebased Created Dec. 19, 2014, 8:09 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « metadata.common ('k') | safari/ext/background.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
(no file at all)
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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 // Load recommended subscriptions 82 // Load recommended subscriptions
83 loadRecommendations(); 83 loadRecommendations();
84 84
85 // Show user's filters 85 // Show user's filters
86 reloadFilters(); 86 reloadFilters();
87 } 87 }
88 $(loadOptions); 88 $(loadOptions);
89 89
90 function onMessage(msg) 90 function onMessage(msg)
91 { 91 {
92 switch (msg.type) 92 if (msg.type == "add-subscription")
93 { 93 startSubscriptionSelection(msg.title, msg.url);
94 case "add-subscription":
95 startSubscriptionSelection(msg.title, msg.url);
96 break;
97 default:
98 console.log("got unexpected message: " + msg.type);
99 }
100 }; 94 };
101 95
102 // Reloads the displayed subscriptions and filters 96 // Reloads the displayed subscriptions and filters
103 function reloadFilters() 97 function reloadFilters()
104 { 98 {
105 // Load user filter URLs 99 // Load user filter URLs
106 var container = document.getElementById("filterLists"); 100 var container = document.getElementById("filterLists");
107 while (container.lastChild) 101 while (container.lastChild)
108 container.removeChild(container.lastChild); 102 container.removeChild(container.lastChild);
109 103
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
647 links[i].href = arguments[i + 1]; 641 links[i].href = arguments[i + 1];
648 links[i].setAttribute("target", "_blank"); 642 links[i].setAttribute("target", "_blank");
649 } 643 }
650 else if (typeof arguments[i + 1] == "function") 644 else if (typeof arguments[i + 1] == "function")
651 { 645 {
652 links[i].href = "javascript:void(0);"; 646 links[i].href = "javascript:void(0);";
653 links[i].addEventListener("click", arguments[i + 1], false); 647 links[i].addEventListener("click", arguments[i + 1], false);
654 } 648 }
655 } 649 }
656 } 650 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld