| 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-2014 Eyeo GmbH | 3 * Copyright (C) 2006-2014 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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 /** | 308 /** |
| 309 * Checks whether any of the prefixes listed match the application locale, | 309 * Checks whether any of the prefixes listed match the application locale, |
| 310 * returns matching prefix if any. | 310 * returns matching prefix if any. |
| 311 */ | 311 */ |
| 312 checkLocalePrefixMatch: function(/**String*/ prefixes) /**String*/ | 312 checkLocalePrefixMatch: function(/**String*/ prefixes) /**String*/ |
| 313 { | 313 { |
| 314 if (!prefixes) | 314 if (!prefixes) |
| 315 return null; | 315 return null; |
| 316 | 316 |
| 317 let appLocale = Utils.appLocale; | 317 let appLocale = Utils.appLocale; |
| 318 for each (let prefix in prefixes.split(/,/)) | 318 for (let prefix of prefixes.split(/,/)) |
| 319 if (new RegExp("^" + prefix + "\\b").test(appLocale)) | 319 if (new RegExp("^" + prefix + "\\b").test(appLocale)) |
| 320 return prefix; | 320 return prefix; |
| 321 | 321 |
| 322 return null; | 322 return null; |
| 323 }, | 323 }, |
| 324 | 324 |
| 325 /** | 325 /** |
| 326 * Chooses the best filter subscription for user's language. | 326 * Chooses the best filter subscription for user's language. |
| 327 */ | 327 */ |
| 328 chooseFilterSubscription: function(/**NodeList*/ subscriptions) /**Node*/ | 328 chooseFilterSubscription: function(/**NodeList*/ subscriptions) /**Node*/ |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 772 Cu.reportError(e); | 772 Cu.reportError(e); |
| 773 // Expected, ctypes isn't supported in Gecko 1.9.2 | 773 // Expected, ctypes isn't supported in Gecko 1.9.2 |
| 774 return null; | 774 return null; |
| 775 } | 775 } |
| 776 }); | 776 }); |
| 777 | 777 |
| 778 if ("@mozilla.org/messenger/headerparser;1" in Cc) | 778 if ("@mozilla.org/messenger/headerparser;1" in Cc) |
| 779 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen
ger/headerparser;1", "nsIMsgHeaderParser"); | 779 XPCOMUtils.defineLazyServiceGetter(Utils, "headerParser", "@mozilla.org/messen
ger/headerparser;1", "nsIMsgHeaderParser"); |
| 780 else | 780 else |
| 781 Utils.headerParser = null; | 781 Utils.headerParser = null; |
| OLD | NEW |