| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 setTitle: function(title) | 85 setTitle: function(title) |
| 86 { | 86 { |
| 87 safari.extension.toolbarItems[0].toolTip = title; | 87 safari.extension.toolbarItems[0].toolTip = title; |
| 88 }, | 88 }, |
| 89 setBadge: function(badge) | 89 setBadge: function(badge) |
| 90 { | 90 { |
| 91 if (!badge) | 91 if (!badge) |
| 92 safari.extension.toolbarItems[0].badge = 0; | 92 safari.extension.toolbarItems[0].badge = 0; |
| 93 else if ("number" in badge) | 93 else if ("number" in badge) |
| 94 safari.extension.toolbarItems[0].badge = badge.number; | 94 safari.extension.toolbarItems[0].badge = badge.number; |
| 95 }, | 95 } |
| 96 | |
| 97 // The following features aren't supported by Safari | |
| 98 hide: function() {}, | |
| 99 show: function() {} | |
| 100 } | 96 } |
| 101 }; | 97 }; |
| 102 | 98 |
| 103 TabMap = function() | 99 TabMap = function() |
| 104 { | 100 { |
| 105 this._tabs = []; | 101 this._tabs = []; |
| 106 this._values = []; | 102 this._values = []; |
| 107 | 103 |
| 108 this._onClosed = this._onClosed.bind(this); | 104 this._onClosed = this._onClosed.bind(this); |
| 109 }; | 105 }; |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 532 // clicked. While Chrome loads it everytime you click the icon. So in order to | 528 // clicked. While Chrome loads it everytime you click the icon. So in order to |
| 533 // force the same behavior in Safari, we are going to reload the page of the | 529 // force the same behavior in Safari, we are going to reload the page of the |
| 534 // bubble everytime it is shown. | 530 // bubble everytime it is shown. |
| 535 if (safari.extension.globalPage.contentWindow != window) | 531 if (safari.extension.globalPage.contentWindow != window) |
| 536 safari.application.addEventListener("popover", function() | 532 safari.application.addEventListener("popover", function() |
| 537 { | 533 { |
| 538 document.documentElement.style.display = "none"; | 534 document.documentElement.style.display = "none"; |
| 539 document.location.reload(); | 535 document.location.reload(); |
| 540 }, true); | 536 }, true); |
| 541 })(); | 537 })(); |
| OLD | NEW |