OLD | NEW |
1 <?xml version="1.0" encoding="UTF-8"?> | 1 <?xml version="1.0" encoding="UTF-8"?> |
2 | 2 |
3 <!DOCTYPE html [ | 3 <!DOCTYPE html [ |
4 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > | 4 <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" > |
5 %brandDTD; | 5 %brandDTD; |
6 <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> | 6 <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd"> |
7 %globalDTD; | 7 %globalDTD; |
8 <!ENTITY % fennecDTD SYSTEM "chrome://browser/locale/about.dtd"> | 8 <!ENTITY % fennecDTD SYSTEM "chrome://browser/locale/about.dtd"> |
9 %fennecDTD; | 9 %fennecDTD; |
10 ]> | 10 ]> |
11 | 11 |
12 <!-- This Source Code Form is subject to the terms of the Mozilla Public | 12 <!-- This Source Code Form is subject to the terms of the Mozilla Public |
13 - License, v. 2.0. If a copy of the MPL was not distributed with this | 13 - License, v. 2.0. If a copy of the MPL was not distributed with this |
14 - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> | 14 - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> |
15 | 15 |
16 <html xmlns="http://www.w3.org/1999/xhtml"> | 16 <html xmlns="http://www.w3.org/1999/xhtml"> |
17 <head> | 17 <head> |
18 <meta name="viewport" content="width=480; initial-scale=.6667; user-scalable=n
o"/> | 18 <meta name="viewport" content="width=480; initial-scale=.6667; user-scalable=n
o"/> |
19 <title>&aboutPage.title;</title> | 19 <title>&aboutPage.title;</title> |
20 <link rel="stylesheet" href="chrome://browser/skin/aboutPageAdblockBrowser.css
" type="text/css"/> | 20 <link rel="stylesheet" href="chrome://browser/skin/aboutPageAdblockBrowser.css
" type="text/css"/> |
21 <link rel="icon" type="image/png" sizes="64x64" href="chrome://branding/conten
t/favicon64.png" /> | 21 <link rel="icon" type="image/png" sizes="64x64" href="chrome://branding/conten
t/favicon64.png" /> |
22 </head> | 22 </head> |
23 | 23 |
24 <body dir="&locale.dir;"> | 24 <body dir="&locale.dir;"> |
| 25 <div id="header" dir="ltr"> |
| 26 <p id="wordmark">Adblock Browser</p> |
| 27 #expand <p id="version">__MOZ_APP_VERSION_DISPLAY__</p> |
| 28 </div> |
| 29 |
25 <div id="banner"> | 30 <div id="banner"> |
26 <div id="header"> | 31 <div id="logo"/> |
27 <p id="wordmark">Adblock <b>Browser</b></p> | |
28 #expand <p id="version">__MOZ_APP_VERSION__</p> | |
29 </div> | |
30 | |
31 #ifdef MOZ_UPDATER | 32 #ifdef MOZ_UPDATER |
32 <div id="updateBox"> | 33 <div id="updateBox"> |
33 <a id="updateLink" href="" onclick="checkForUpdates();">&aboutPage.checkFo
rUpdates.link;</a> | 34 <a id="updateLink" href="">&aboutPage.checkForUpdates.link;</a> |
34 <span id="update-message-checking">&aboutPage.checkForUpdates.checking;</s
pan> | 35 <span id="update-message-checking">&aboutPage.checkForUpdates.checking;</s
pan> |
35 <span id="update-message-none">&aboutPage.checkForUpdates.none;</span> | 36 <span id="update-message-none">&aboutPage.checkForUpdates.none;</span> |
36 <span id="update-message-found" onclick="downloadUpdate()">&aboutPage.chec
kForUpdates.available2;</span> | 37 <span id="update-message-found">&aboutPage.checkForUpdates.available2;</sp
an> |
37 <span id="update-message-downloading">&aboutPage.checkForUpdates.downloadi
ng;</span> | 38 <span id="update-message-downloading">&aboutPage.checkForUpdates.downloadi
ng;</span> |
38 <span id="update-message-downloaded" onclick="installUpdate()">&aboutPage.
checkForUpdates.downloaded2;</span> | 39 <span id="update-message-downloaded">&aboutPage.checkForUpdates.downloaded
2;</span> |
39 </div> | 40 </div> |
40 #endif | 41 #endif |
41 | 42 |
42 <div id="messages"> | 43 <div id="messages"> |
43 <p id="distributionAbout" hidden="true"/> | 44 <p id="distributionAbout" hidden="true"/> |
44 <p id="distributionID" hidden="true"/> | 45 <p id="distributionID" hidden="true"/> |
45 <p id="telemetry" hidden="true"> | 46 <p id="telemetry" hidden="true"> |
46 &aboutPage.warningVersion; | 47 &aboutPage.warningVersion; |
47 #ifdef MOZ_TELEMETRY_ON_BY_DEFAULT | |
48 &aboutPage.telemetryStart;<a href="http://www.mozilla.org/">&aboutPage.t
elemetryMozillaLink;</a>&aboutPage.telemetryEnd; | |
49 #endif | |
50 </p> | 48 </p> |
51 </div> | 49 </div> |
52 | 50 |
53 </div> | 51 </div> |
54 | 52 |
55 <ul id="aboutLinks"> | 53 <ul id="aboutLinks"> |
56 <div class="top-border"></div> | 54 <div class="top-border"></div> |
57 <li><a id="faqURL">&aboutPage.faq.label;</a></li> | 55 <li><a id="faqURL">&aboutPage.faq.label;</a></li> |
58 <li><a id="privacyURL">&aboutPage.privacyPolicy.label;</a></li> | 56 <li><a id="privacyURL">&aboutPage.privacyPolicy.label;</a></li> |
59 <li><a id="creditsURL">&aboutPage.credits.label;</a></li> | 57 <li><a id="creditsURL">&aboutPage.credits.label;</a></li> |
60 <div class="bottom-border"></div> | 58 <div class="bottom-border"></div> |
61 </ul> | 59 </ul> |
62 | 60 |
63 <div id="aboutDetails"> | 61 <script type="application/javascript" src="chrome://browser/content/about.js
" /> |
64 <p>&logoTrademark;</p> | |
65 </div> | |
66 | 62 |
67 <script type="application/javascript;version=1.8"><![CDATA[ | |
68 let Ci = Components.interfaces, Cc = Components.classes, Cu = Components.u
tils, Cr = Components.results; | |
69 Cu.import("resource://gre/modules/XPCOMUtils.jsm"); | |
70 Cu.import("resource://gre/modules/Services.jsm"); | |
71 | |
72 // Include the build date and a warning about Telemetry | |
73 // if this is an "a#" (nightly or aurora) build | |
74 #expand const version = "__MOZ_APP_VERSION__"; | |
75 if (/a\d+$/.test(version)) { | |
76 let buildID = Services.appinfo.appBuildID; | |
77 let buildDate = buildID.slice(0,4) + "-" + buildID.slice(4,6) + "-" + bu
ildID.slice(6,8); | |
78 let br = document.createElement("br"); | |
79 let versionPara = document.getElementById("version"); | |
80 versionPara.appendChild(br); | |
81 let date = document.createTextNode("(" + buildDate + ")"); | |
82 versionPara.appendChild(date); | |
83 document.getElementById("telemetry").hidden = false; | |
84 } | |
85 | |
86 // Always append the build ID in Adblock Browser. | |
87 document.getElementById("version").innerHTML = version + "." + | |
88 Services.appinfo.appBuildID; | |
89 | |
90 // Include the Distribution information if available | |
91 try { | |
92 let distroId = Services.prefs.getCharPref("distribution.id"); | |
93 if (distroId) { | |
94 let distroVersion = Services.prefs.getCharPref("distribution.version")
; | |
95 let distroIdField = document.getElementById("distributionID"); | |
96 distroIdField.textContent = distroId + " - " + distroVersion; | |
97 distroIdField.hidden = false; | |
98 | |
99 let distroAbout = Services.prefs.getComplexValue("distribution.about",
Ci.nsISupportsString); | |
100 let distroField = document.getElementById("distributionAbout"); | |
101 distroField.textContent = distroAbout; | |
102 distroField.hidden = false; | |
103 } | |
104 } catch (e) { | |
105 // Pref is unset | |
106 } | |
107 | |
108 // Using formatted URLs. See https://issues.adblockplus.org/ticket/3220 | |
109 // get URLs from prefs | |
110 try { | |
111 let formatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"].getServ
ice(Ci.nsIURLFormatter); | |
112 | |
113 let links = [ | |
114 {id: "faqURL", pref: "app.faqURL"}, | |
115 {id: "privacyURL", pref: "app.privacyURL"}, | |
116 {id: "creditsURL", pref: "app.creditsURL"}, | |
117 ]; | |
118 | |
119 links.forEach(function(link) { | |
120 let url = formatter.formatURLPref(link.pref); | |
121 let element = document.getElementById(link.id); | |
122 element.setAttribute("href", url); | |
123 }); | |
124 } catch (ex) {} | |
125 | |
126 #ifdef MOZ_UPDATER | |
127 let Updater = { | |
128 update: null, | |
129 | |
130 init: function() { | |
131 Services.obs.addObserver(this, "Update:CheckResult", false); | |
132 }, | |
133 | |
134 observe: function(aSubject, aTopic, aData) { | |
135 if (aTopic == "Update:CheckResult") { | |
136 showUpdateMessage(aData); | |
137 } | |
138 }, | |
139 }; | |
140 | |
141 Updater.init(); | |
142 | |
143 function checkForUpdates() { | |
144 showCheckingMessage(); | |
145 | |
146 Services.androidBridge.handleGeckoMessage({ type: "Update:Check" }); | |
147 } | |
148 | |
149 function downloadUpdate() { | |
150 Services.androidBridge.handleGeckoMessage({ type: "Update:Download" }); | |
151 } | |
152 | |
153 function installUpdate() { | |
154 showCheckAction(); | |
155 | |
156 Services.androidBridge.handleGeckoMessage({ type: "Update:Install" }); | |
157 } | |
158 | |
159 let updateLink = document.getElementById("updateLink"); | |
160 let checkingSpan = document.getElementById("update-message-checking"); | |
161 let noneSpan = document.getElementById("update-message-none"); | |
162 let foundSpan = document.getElementById("update-message-found"); | |
163 let downloadingSpan = document.getElementById("update-message-downloading"
); | |
164 let downloadedSpan = document.getElementById("update-message-downloaded"); | |
165 | |
166 function showCheckAction() { | |
167 checkingSpan.style.display = "none"; | |
168 noneSpan.style.display = "none"; | |
169 foundSpan.style.display = "none"; | |
170 downloadingSpan.style.display = "none"; | |
171 downloadedSpan.style.display = "none"; | |
172 updateLink.style.display = "block"; | |
173 } | |
174 | |
175 function showCheckingMessage() { | |
176 updateLink.style.display = "none"; | |
177 noneSpan.style.display = "none"; | |
178 foundSpan.style.display = "none"; | |
179 downloadingSpan.style.display = "none"; | |
180 downloadedSpan.style.display = "none"; | |
181 checkingSpan.style.display = "block"; | |
182 } | |
183 | |
184 function showUpdateMessage(aResult) { | |
185 updateLink.style.display = "none"; | |
186 checkingSpan.style.display = "none"; | |
187 noneSpan.style.display = "none"; | |
188 foundSpan.style.display = "none"; | |
189 downloadingSpan.style.display = "none"; | |
190 downloadedSpan.style.display = "none"; | |
191 | |
192 // the aResult values come from mobile/android/base/UpdateServiceHelper.
java | |
193 switch (aResult) { | |
194 case "NOT_AVAILABLE": | |
195 noneSpan.style.display = "block"; | |
196 setTimeout(showCheckAction, 2000); | |
197 break; | |
198 case "AVAILABLE": | |
199 foundSpan.style.display = "block"; | |
200 break; | |
201 case "DOWNLOADING": | |
202 downloadingSpan.style.display = "block"; | |
203 break; | |
204 case "DOWNLOADED": | |
205 downloadedSpan.style.display = "block"; | |
206 break; | |
207 } | |
208 } | |
209 #endif | |
210 ]]></script> | |
211 </body> | 63 </body> |
212 </html> | 64 </html> |
OLD | NEW |