From 2ec28f2705d63b316373614b6125c0f67f7c835d Mon Sep 17 00:00:00 2001 From: Kathy Brade Date: Wed, 25 Nov 2015 11:36:20 -0500 Subject: [PATCH] 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). --- .../content/abouttbupdate/aboutTBUpdate.css | 54 ++++++++++ .../content/abouttbupdate/aboutTBUpdate.js | 10 ++ .../content/abouttbupdate/aboutTBUpdate.xhtml | 36 +++++++ .../abouttbupdate/aboutTBUpdateLogo.png | Bin 0 -> 23266 bytes browser/base/content/browser.js | 17 +++- browser/base/content/tab-content.js | 92 ++++++++++++++++++ browser/base/jar.mn | 10 +- browser/components/about/AboutRedirector.cpp | 7 ++ browser/components/build/nsModule.cpp | 3 + browser/components/nsBrowserContentHandler.js | 12 +++ .../en-US/chrome/browser/aboutTBUpdate.dtd | 6 ++ browser/locales/jar.mn | 3 + 12 files changed, 246 insertions(+), 4 deletions(-) create mode 100644 browser/base/content/abouttbupdate/aboutTBUpdate.css create mode 100644 browser/base/content/abouttbupdate/aboutTBUpdate.js create mode 100644 browser/base/content/abouttbupdate/aboutTBUpdate.xhtml create mode 100644 browser/base/content/abouttbupdate/aboutTBUpdateLogo.png create mode 100644 browser/locales/en-US/chrome/browser/aboutTBUpdate.dtd diff --git a/browser/base/content/abouttbupdate/aboutTBUpdate.css b/browser/base/content/abouttbupdate/aboutTBUpdate.css new file mode 100644 index 0000000000000..c171c58624ec5 --- /dev/null +++ b/browser/base/content/abouttbupdate/aboutTBUpdate.css @@ -0,0 +1,54 @@ +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%; +} + +#torbrowser-version { + /* These CSS rules match the about:tor page */ + position: fixed; + top: 6px; + right: 6px; + height: 30px; + width: 200px; + white-space: pre-wrap; + text-align: right; + color: #4d4d4d; + font-family: "Liberation Sans", Arial, Helvetica, sans-serif; + font-size: 14px; +} + +#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%; + font-weight: bold; + margin-bottom: 20px; +} + +#changelog-container { + margin: 0px 20px 20px 20px; +} + +#changelog-heading { + font-weight: bold; + margin-bottom: 4px; +} + +#changelog { + margin-left: 20px; + white-space: pre; +} diff --git a/browser/base/content/abouttbupdate/aboutTBUpdate.js b/browser/base/content/abouttbupdate/aboutTBUpdate.js new file mode 100644 index 0000000000000..8243647c57083 --- /dev/null +++ b/browser/base/content/abouttbupdate/aboutTBUpdate.js @@ -0,0 +1,10 @@ +// 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); +} diff --git a/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml b/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml new file mode 100644 index 0000000000000..115ec40e5abaf --- /dev/null +++ b/browser/base/content/abouttbupdate/aboutTBUpdate.xhtml @@ -0,0 +1,36 @@ + + + + %htmlDTD; + + %globalDTD; + + %tbUpdateDTD; +]> + + + + &aboutTBUpdate.title; + +