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

Side by Side Diff: chrome/background.js

Issue 5867629902299136: Fixed various issues in older Chrome versions (Closed)
Patch Set: Created Dec. 19, 2013, 10:46 a.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 | chrome/common.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 <http://adblockplus.org/>, 2 * This file is part of Adblock Plus <http://adblockplus.org/>,
3 * Copyright (C) 2006-2013 Eyeo GmbH 3 * Copyright (C) 2006-2013 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 setBadge: function(badge) 212 setBadge: function(badge)
213 { 213 {
214 if (!badge) 214 if (!badge)
215 { 215 {
216 chrome.browserAction.setBadgeText({ 216 chrome.browserAction.setBadgeText({
217 tabId: this._tabId, 217 tabId: this._tabId,
218 text: "" 218 text: ""
219 }); 219 });
220 return; 220 return;
221 } 221 }
222 222
223 if ("color" in badge) 223 if ("color" in badge)
224 { 224 {
225 chrome.browserAction.setBadgeBackgroundColor({ 225 chrome.browserAction.setBadgeBackgroundColor({
226 tabId: this._tabId, 226 tabId: this._tabId,
227 color: badge.color 227 color: badge.color
228 }); 228 });
229 } 229 }
230 230
231 if ("number" in badge) 231 if ("number" in badge)
232 { 232 {
233 chrome.browserAction.setBadgeText({ 233 chrome.browserAction.setBadgeText({
234 tabId: this._tabId, 234 tabId: this._tabId,
235 text: badge.number.toString() 235 text: badge.number.toString()
236 }); 236 });
237 } 237 }
238 } 238 }
239 }; 239 };
240 240
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 onclick(info.srcUrl, new Tab(tab)); 381 onclick(info.srcUrl, new Tab(tab));
382 } 382 }
383 }); 383 });
384 }, 384 },
385 removeAll: function(callback) 385 removeAll: function(callback)
386 { 386 {
387 chrome.contextMenus.removeAll(callback); 387 chrome.contextMenus.removeAll(callback);
388 } 388 }
389 }; 389 };
390 })(); 390 })();
OLDNEW
« no previous file with comments | « no previous file | chrome/common.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld