OLD | NEW |
1 /* | 1 /* |
2 * This file is part of Adblock Plus <https://adblockplus.org/>, | 2 * This file is part of Adblock Plus <https://adblockplus.org/>, |
3 * Copyright (C) 2006-2016 Eyeo GmbH | 3 * Copyright (C) 2006-2016 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 }; | 83 }; |
84 | 84 |
85 modules.utils = { | 85 modules.utils = { |
86 Utils: { | 86 Utils: { |
87 getDocLink: function(link) | 87 getDocLink: function(link) |
88 { | 88 { |
89 return "https://adblockplus.org/redirect?link=" + encodeURIComponent(lin
k); | 89 return "https://adblockplus.org/redirect?link=" + encodeURIComponent(lin
k); |
90 }, | 90 }, |
91 get appLocale() | 91 get appLocale() |
92 { | 92 { |
93 return parent.ext.i18n.getMessage("@@ui_locale").replace(/_/g, "-"); | 93 return parent.ext.i18n.locale.replace(/_/g, "-"); |
94 } | 94 }, |
| 95 get readingDirection() |
| 96 { |
| 97 return bidiDir = /^(ar|fa|he|ug|ur)(-|$)/.test(this.appLocale) ? "rtl" :
"ltr"; |
| 98 } |
95 } | 99 } |
96 }; | 100 }; |
97 | 101 |
98 modules.prefs = {Prefs: new EventEmitter()}; | 102 modules.prefs = {Prefs: new EventEmitter()}; |
99 var prefs = { | 103 var prefs = { |
100 notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [], | 104 notifications_ignoredcategories: (params.showNotificationUI) ? ["*"] : [], |
101 notifications_showui: params.showNotificationUI, | 105 notifications_showui: params.showNotificationUI, |
102 safari_contentblocker: false, | 106 safari_contentblocker: false, |
103 shouldShowBlockElementMenu: true, | 107 shouldShowBlockElementMenu: true, |
104 show_devtools_panel: true, | 108 show_devtools_panel: true, |
(...skipping 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 | 484 |
481 if (params.safariContentBlocker) | 485 if (params.safariContentBlocker) |
482 { | 486 { |
483 global.safari = { | 487 global.safari = { |
484 extension: { | 488 extension: { |
485 setContentBlocker: function() {} | 489 setContentBlocker: function() {} |
486 } | 490 } |
487 }; | 491 }; |
488 } | 492 } |
489 })(this); | 493 })(this); |
OLD | NEW |