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

Unified Diff: chrome/content/ui/i18n.js

Issue 11533106: Prepared adblockplus for Safari (Closed)
Patch Set: Fixed broken path to CSS for firefox Created Sept. 6, 2013, 5:18 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld