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

Side by Side Diff: safari/ext/background.js

Issue 5838171610808320: Added high resolution icons for Retina displays (Closed)
Patch Set: Addressed comment Created April 3, 2014, 11:40 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 | « metadata.safari ('k') | safari/icons/abp-32.png » ('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-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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 233
234 if (!("global" in property)) 234 if (!("global" in property))
235 property.global = toolbarItem[name]; 235 property.global = toolbarItem[name];
236 236
237 if (this._tab._tab == currentWindow.activeTab) 237 if (this._tab._tab == currentWindow.activeTab)
238 toolbarItem[name] = value; 238 toolbarItem[name] = value;
239 } 239 }
240 }, 240 },
241 setIcon: function(path) 241 setIcon: function(path)
242 { 242 {
243 this._set("image", safari.extension.baseURI + path); 243 this._set("image", safari.extension.baseURI + path.replace("$size", "16")) ;
244 }, 244 },
245 setBadge: function(badge) 245 setBadge: function(badge)
246 { 246 {
247 if (!badge) 247 if (!badge)
248 this._set("badge", 0); 248 this._set("badge", 0);
249 else if ("number" in badge) 249 else if ("number" in badge)
250 this._set("badge", badge.number); 250 this._set("badge", badge.number);
251 } 251 }
252 }; 252 };
253 253
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
702 for (var i = 0; i < contextMenuItems.length; i++) 702 for (var i = 0; i < contextMenuItems.length; i++)
703 { 703 {
704 if (contextMenuItems[i].id == event.command) 704 if (contextMenuItems[i].id == event.command)
705 { 705 {
706 contextMenuItems[i].onclick(event.userInfo.srcUrl, new Tab(safari.applic ation.activeBrowserWindow.activeTab)); 706 contextMenuItems[i].onclick(event.userInfo.srcUrl, new Tab(safari.applic ation.activeBrowserWindow.activeTab));
707 break; 707 break;
708 } 708 }
709 } 709 }
710 }, false); 710 }, false);
711 })(); 711 })();
OLDNEW
« no previous file with comments | « metadata.safari ('k') | safari/icons/abp-32.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld