| OLD | NEW |
| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 property.global = toolbarItem[name]; | 234 property.global = toolbarItem[name]; |
| 235 | 235 |
| 236 if (this._tab._tab == currentWindow.activeTab) | 236 if (this._tab._tab == currentWindow.activeTab) |
| 237 toolbarItem[name] = value; | 237 toolbarItem[name] = value; |
| 238 } | 238 } |
| 239 }, | 239 }, |
| 240 setIcon: function(path) | 240 setIcon: function(path) |
| 241 { | 241 { |
| 242 this._set("image", safari.extension.baseURI + path); | 242 this._set("image", safari.extension.baseURI + path); |
| 243 }, | 243 }, |
| 244 setTitle: function(title) | |
| 245 { | |
| 246 this._set("label", title); | |
| 247 this._set("toolTip", title); | |
| 248 }, | |
| 249 setBadge: function(badge) | 244 setBadge: function(badge) |
| 250 { | 245 { |
| 251 if (!badge) | 246 if (!badge) |
| 252 this._set("badge", 0); | 247 this._set("badge", 0); |
| 253 else if ("number" in badge) | 248 else if ("number" in badge) |
| 254 this._set("badge", badge.number); | 249 this._set("badge", badge.number); |
| 255 } | 250 } |
| 256 }; | 251 }; |
| 257 | 252 |
| 258 ext.tabs.onActivated.addListener(function(tab) | 253 ext.tabs.onActivated.addListener(function(tab) |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 for (var i = 0; i < contextMenuItems.length; i++) | 700 for (var i = 0; i < contextMenuItems.length; i++) |
| 706 { | 701 { |
| 707 if (contextMenuItems[i].id == event.command) | 702 if (contextMenuItems[i].id == event.command) |
| 708 { | 703 { |
| 709 contextMenuItems[i].onclick(event.userInfo.srcUrl, new Tab(safari.applic
ation.activeBrowserWindow.activeTab)); | 704 contextMenuItems[i].onclick(event.userInfo.srcUrl, new Tab(safari.applic
ation.activeBrowserWindow.activeTab)); |
| 710 break; | 705 break; |
| 711 } | 706 } |
| 712 } | 707 } |
| 713 }, false); | 708 }, false); |
| 714 })(); | 709 })(); |
| OLD | NEW |