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 again Created Dec. 19, 2014, 3:45 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:
Left: Side by side diff | Download
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
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 }
98 }; 94 };
99 95
100 // Reloads the displayed subscriptions and filters 96 // Reloads the displayed subscriptions and filters
101 function reloadFilters() 97 function reloadFilters()
102 { 98 {
103 // Load user filter URLs 99 // Load user filter URLs
104 var container = document.getElementById("filterLists"); 100 var container = document.getElementById("filterLists");
105 while (container.lastChild) 101 while (container.lastChild)
106 container.removeChild(container.lastChild); 102 container.removeChild(container.lastChild);
107 103
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 links[i].href = arguments[i + 1]; 641 links[i].href = arguments[i + 1];
646 links[i].setAttribute("target", "_blank"); 642 links[i].setAttribute("target", "_blank");
647 } 643 }
648 else if (typeof arguments[i + 1] == "function") 644 else if (typeof arguments[i + 1] == "function")
649 { 645 {
650 links[i].href = "javascript:void(0);"; 646 links[i].href = "javascript:void(0);";
651 links[i].addEventListener("click", arguments[i + 1], false); 647 links[i].addEventListener("click", arguments[i + 1], false);
652 } 648 }
653 } 649 }
654 } 650 }
LEFTRIGHT

Powered by Google App Engine
This is Rietveld