Left: | ||
Right: |
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-2015 Eyeo GmbH | 3 * Copyright (C) 2006-2015 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
98 .replace(/%LINK%/g, page) | 98 .replace(/%LINK%/g, page) |
99 .replace(/%LANG%/g, Utils.appLocale); | 99 .replace(/%LANG%/g, Utils.appLocale); |
100 } | 100 } |
101 | 101 |
102 function initTranslations() | 102 function initTranslations() |
103 { | 103 { |
104 // Map message ID to HTML element ID | 104 // Map message ID to HTML element ID |
105 var mapping = { | 105 var mapping = { |
106 "aa-title": "first-run-aa-title", | 106 "aa-title": "first-run-aa-title", |
107 "aa-text": "first-run-aa-text", | 107 "aa-text": "first-run-aa-text", |
108 "title-main": AdblockPlus.isUpdate() ? "first-run-title-update" : "first-run -title-install", | 108 "title-main": AdblockPlus.isFromSimpleAdblock() ? "first-run-title-simple-ad block" : |
Eric
2015/03/27 12:51:45
It seems that the string "first-run-title-simple-a
Oleksandr
2015/04/16 09:58:09
We have to hardcode this logic somewhere. I think
| |
109 AdblockPlus.isUpdate() ? "first-run-title-update" : "first-run-title-install", | |
109 "share-donate": "first-run-share2-donate", | 110 "share-donate": "first-run-share2-donate", |
110 "share-text": "first-run-share2", | 111 "share-text": "first-run-share2", |
111 "share-connection": "first-run-share2-or" | 112 "share-connection": "first-run-share2-or" |
112 }; | 113 }; |
113 | 114 |
114 document.title = AdblockPlus.getMessage("first-run", mapping['title-main']); | 115 document.title = AdblockPlus.getMessage("first-run", mapping['title-main']); |
115 for (var i in mapping) | 116 for (var i in mapping) |
116 { | 117 { |
117 var element = document.getElementById(i); | 118 var element = document.getElementById(i); |
118 setElementText(element, AdblockPlus.getMessage("first-run", mapping[i])); | 119 setElementText(element, AdblockPlus.getMessage("first-run", mapping[i])); |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
175 links[i].href = curArg; | 176 links[i].href = curArg; |
176 links[i].setAttribute("target", "_blank"); | 177 links[i].setAttribute("target", "_blank"); |
177 } | 178 } |
178 else if (typeof curArg == "function") | 179 else if (typeof curArg == "function") |
179 { | 180 { |
180 links[i].href = "javascript:void(0);"; | 181 links[i].href = "javascript:void(0);"; |
181 links[i].addEventListener("click", curArg, false); | 182 links[i].addEventListener("click", curArg, false); |
182 } | 183 } |
183 } | 184 } |
184 } | 185 } |
OLD | NEW |