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

Side by Side Diff: messageResponder.js

Issue 6141186662203392: Issue 1814 - Use ext.showOptions() on the first-run page (Closed)
Patch Set: Created Jan. 15, 2015, 12:57 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 | « ext/background.js ('k') | no next file » | 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 <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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 callback({ 113 callback({
114 locale: Utils.appLocale, 114 locale: Utils.appLocale,
115 isRTL: Utils.chromeRegistry.isLocaleRTL("adblockplus") 115 isRTL: Utils.chromeRegistry.isLocaleRTL("adblockplus")
116 }); 116 });
117 } 117 }
118 else 118 else
119 callback(null); 119 callback(null);
120 break; 120 break;
121 case "app.open": 121 case "app.open":
122 if (message.what == "options") 122 if (message.what == "options")
123 { 123 ext.showOptions();
124 if (typeof global.openOptions == "function")
125 global.openOptions();
126 else
127 require("ui").UI.openFiltersDialog();
128 }
129 break; 124 break;
130 case "subscriptions.get": 125 case "subscriptions.get":
131 var subscriptions = FilterStorage.subscriptions.filter(function(s) 126 var subscriptions = FilterStorage.subscriptions.filter(function(s)
132 { 127 {
133 if (message.ignoreDisabled && s.disabled) 128 if (message.ignoreDisabled && s.disabled)
134 return false; 129 return false;
135 if (s instanceof DownloadableSubscription && message.downloadable) 130 if (s instanceof DownloadableSubscription && message.downloadable)
136 return true; 131 return true;
137 if (s instanceof SpecialSubscription && message.special) 132 if (s instanceof SpecialSubscription && message.special)
138 return true; 133 return true;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 168 }
174 169
175 if (message.filter) 170 if (message.filter)
176 filters.subscription = message.filter; 171 filters.subscription = message.filter;
177 else 172 else
178 delete filters.subscription; 173 delete filters.subscription;
179 break; 174 break;
180 } 175 }
181 }); 176 });
182 })(this); 177 })(this);
OLDNEW
« no previous file with comments | « ext/background.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld