Index: safari/background.js |
=================================================================== |
--- a/safari/background.js |
+++ b/safari/background.js |
@@ -77,8 +77,7 @@ |
this._tab.activate(); |
}, |
sendMessage: sendMessage, |
- pageAction: { |
- // there are no page actions in safari, so we use toolbar items instead |
+ browserAction: { |
setIcon: function(path) |
{ |
safari.extension.toolbarItems[0].image = safari.extension.baseURI + path; |
@@ -87,10 +86,15 @@ |
{ |
safari.extension.toolbarItems[0].toolTip = title; |
}, |
+ setBadgeNumber: function(number) |
+ { |
+ safari.extension.toolbarItems[0].badge = (number === null) ? 0 : number; |
+ }, |
- // toolbar items in safari can"t get hidden |
+ // Safari does not provide these functionalities |
Wladimir Palant
2013/12/03 12:55:43
Seeing the plural of functionality is weird, even
Thomas Greiner
2013/12/04 10:44:50
Done.
|
hide: function() {}, |
- show: function() {} |
+ show: function() {}, |
+ setBadgeBackgroundColor: function(color) {} |
} |
}; |