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

Side by Side Diff: lib/utils.js

Issue 16067002: Added Safari Support (Closed)
Patch Set: Created Oct. 21, 2013, 8:11 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 runAsync: function(callback, thisPtr) 24 runAsync: function(callback, thisPtr)
25 { 25 {
26 var params = Array.prototype.slice.call(arguments, 2); 26 var params = Array.prototype.slice.call(arguments, 2);
27 window.setTimeout(function() 27 window.setTimeout(function()
28 { 28 {
29 callback.apply(thisPtr, params); 29 callback.apply(thisPtr, params);
30 }, 0); 30 }, 0);
31 }, 31 },
32 get appLocale() 32 get appLocale()
33 { 33 {
34 var locale = chrome.i18n.getMessage("@@ui_locale").replace(/_/g, "-"); 34 var locale = ext.i18n.getMessage("@@ui_locale").replace(/_/g, "-");
35 this.__defineGetter__("appLocale", function() {return locale}); 35 this.__defineGetter__("appLocale", function() {return locale});
36 return this.appLocale; 36 return this.appLocale;
37 }, 37 },
38 generateChecksum: function(lines) 38 generateChecksum: function(lines)
39 { 39 {
40 // We cannot calculate MD5 checksums yet :-( 40 // We cannot calculate MD5 checksums yet :-(
41 return null; 41 return null;
42 }, 42 },
43 makeURI: function(url) 43 makeURI: function(url)
44 { 44 {
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 return selectedItem; 97 return selectedItem;
98 }, 98 },
99 99
100 getDocLink: function(linkID) 100 getDocLink: function(linkID)
101 { 101 {
102 var Prefs = require("prefs").Prefs; 102 var Prefs = require("prefs").Prefs;
103 var docLink = Prefs.documentation_link; 103 var docLink = Prefs.documentation_link;
104 return docLink.replace(/%LINK%/g, linkID).replace(/%LANG%/g, Utils.appLocale ); 104 return docLink.replace(/%LINK%/g, linkID).replace(/%LANG%/g, Utils.appLocale );
105 } 105 }
106 }; 106 };
OLDNEW
« chrome/background.js ('K') | « include.preload.js ('k') | metadata.chrome » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld