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