Commit 6fc8ff9c authored by Kathleen Brade's avatar Kathleen Brade Committed by Georg Koppen
Browse files

Bug 16940: After update, load local change notes.

Add an about:tbupdate page that displays the first section from
TorBrowser/Docs/ChangeLog.txt and includes a link to the remote
post-update page (typically our blog entry for the release).
parent 8a64330a
Loading
Loading
Loading
Loading
+34 −0
Original line number Diff line number Diff line
body {
  font-family: sans-serif;
  font-size: 110%;
  background-image: -moz-linear-gradient(top, #ffffff, #ffffff 10%, #d5ffd5 50%, #d5ffd5);
  background-attachment: fixed;
  background-size: 100% 100%;
}

#logo {
  background-image: url("chrome://browser/content/abouttbupdate/aboutTBUpdateLogo.png");
  height: 128px;
  width: 128px;
  margin: 20px;
  float: left;
}

#msg {
  margin-top: 50px;
  float: left;
}

#msg-updated {
  font-size: 120%;
  margin-bottom: 20px;
}

#changelog-container {
  margin: 0px 20px 20px 20px;
}

#changelog {
  margin-left: 20px;
  white-space: pre;
}
+10 −0
Original line number Diff line number Diff line
// Copyright (c) 2015, The Tor Project, Inc.
// See LICENSE for licensing information.
//
// vim: set sw=2 sts=2 ts=8 et syntax=javascript:

function init()
{
  let event = new CustomEvent("AboutTBUpdateLoad", { bubbles: true });
  document.dispatchEvent(event);
}
+34 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html [
  <!ENTITY % htmlDTD
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "DTD/xhtml1-strict.dtd">
  %htmlDTD;
  <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
  %globalDTD;
  <!ENTITY % tbUpdateDTD SYSTEM "chrome://browser/locale/aboutTBUpdate.dtd">
  %tbUpdateDTD;
]>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <title>&aboutTBUpdate.title;</title>
  <link rel="stylesheet" type="text/css"
        href="chrome://browser/content/abouttbupdate/aboutTBUpdate.css"/>
  <script src="chrome://browser/content/abouttbupdate/aboutTBUpdate.js"
          type="text/javascript;version=1.7"/>
</head>
<body dir="&locale.dir;" onload="init()">
<div id="logo"/>
<div id="msg">
<div id="msg-updated">&aboutTBUpdate.updated;</div>
<div>&aboutTBUpdate.linkPrefix;<a id="infolink">&aboutTBUpdate.linkLabel;</a>&aboutTBUpdate.linkSuffix;
</div>
</div>
<br clear="all"/>
<div id="changelog-container">&aboutTBUpdate.changeLogHeading;
<div id="changelog"></div>
</div>
</body>
</html>
+22.7 KiB
Loading image diff...
+15 −2
Original line number Diff line number Diff line
@@ -259,6 +259,9 @@ XPCOMUtils.defineLazyModuleGetter(this, "LoginManagerParent",

var gInitialPages = [
  "about:tor",
#ifdef TOR_BROWSER_UPDATE
  "about:tbupdate",
#endif
  "about:blank",
  "about:newtab",
  "about:home",
@@ -2425,8 +2428,14 @@ function URLBarSetURI(aURI) {

    // Replace initial page URIs with an empty string
    // only if there's no opener (bug 370555).
#ifdef TOR_BROWSER_UPDATE
    if (gInitialPages.indexOf(uri.spec.split('?')[0]) != -1 &&
        checkEmptyPageOrigin(gBrowser.selectedBrowser, uri))
#else
    if (gInitialPages.indexOf(uri.spec) != -1 &&
        checkEmptyPageOrigin(gBrowser.selectedBrowser, uri)) {
        checkEmptyPageOrigin(gBrowser.selectedBrowser, uri))
#endif
    {
      value = "";
    } else {
      value = losslessDecodeURI(uri);
@@ -7043,7 +7052,11 @@ var gIdentityHandler = {
      this._uriHasHost = false;
    }

    let whitelist = /^(?:accounts|addons|cache|config|crashes|customizing|downloads|healthreport|home|license|newaddon|permissions|preferences|privatebrowsing|rights|sessionrestore|support|welcomeback)(?:[?#]|$)/i;
#ifdef TOR_BROWSER_UPDATE
    let whitelist = /^(?:accounts|addons|cache|config|crashes|customizing|downloads|healthreport|home|license|newaddon|permissions|preferences|privatebrowsing|rights|sessionrestore|support|welcomeback|tor|tbupdate)(?:[?#]|$)/i;
#else
    let whitelist = /^(?:accounts|addons|cache|config|crashes|customizing|downloads|healthreport|home|license|newaddon|permissions|preferences|privatebrowsing|rights|sessionrestore|support|welcomeback|tor)(?:[?#]|$)/i;
#endif
    this._isSecureInternalUI = uri.schemeIs("about") && whitelist.test(uri.path);

    this._sslStatus = gBrowser.securityUI
Loading