| Index: chrome/content/ui/i18n.js |
| =================================================================== |
| --- a/chrome/content/ui/i18n.js |
| +++ b/chrome/content/ui/i18n.js |
| @@ -15,12 +15,8 @@ |
| * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>. |
| */ |
| -var i18n; |
| -if (typeof chrome != "undefined") |
| -{ |
| - i18n = chrome.i18n; |
| -} |
| -else |
| +var i18n = (window.ext && ext.i18n) || (window.chrome && chrome.i18n); |
|
Wladimir Palant
2013/09/10 06:53:46
This will produce a warning in JavaScript - you ar
Wladimir Palant
2013/09/10 07:10:40
A warning in Firefox is what I meant of course.
Sebastian Noack
2013/09/10 10:56:29
I couldn't reproduce that. Accessing an undefined
Wladimir Palant
2013/09/10 11:10:14
You need to enable javascript.option.strict prefer
Sebastian Noack
2013/09/10 14:20:57
Sure, in strict mode that wouldn't work anymore. I
Wladimir Palant
2013/09/10 14:34:21
That's just a development setting, not strict mode
|
| +if (!i18n) |
| { |
| // Using Firefox' approach on i18n instead |