browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,135 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!--
     1.6 +# This Source Code Form is subject to the terms of the Mozilla Public
     1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.9 +-->
    1.10 +<!DOCTYPE html [
    1.11 +  <!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
    1.12 +  %htmlDTD;
    1.13 +  <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
    1.14 +  %globalDTD;
    1.15 +  <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
    1.16 +  %brandDTD;
    1.17 +  <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
    1.18 +  %browserDTD;
    1.19 +  <!ENTITY % privatebrowsingpageDTD SYSTEM "chrome://browser/locale/aboutPrivateBrowsing.dtd">
    1.20 +  %privatebrowsingpageDTD;
    1.21 +]>
    1.22 +
    1.23 +<html xmlns="http://www.w3.org/1999/xhtml">
    1.24 +  <head>
    1.25 +    <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all"/>
    1.26 +    <link rel="stylesheet" href="chrome://browser/skin/aboutPrivateBrowsing.css" type="text/css" media="all"/>
    1.27 +    <style type="text/css"><![CDATA[
    1.28 +      body.normal .showPrivate,
    1.29 +      body.private .showNormal {
    1.30 +        display: none;
    1.31 +      }
    1.32 +    ]]></style>
    1.33 +    <script type="application/javascript;version=1.7"><![CDATA[
    1.34 +      const Cc = Components.classes;
    1.35 +      const Ci = Components.interfaces;
    1.36 +
    1.37 +      Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
    1.38 +
    1.39 +      if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
    1.40 +        document.title = "]]>&privatebrowsingpage.title.normal;<![CDATA[";
    1.41 +        setFavIcon("chrome://global/skin/icons/question-16.png");
    1.42 +      } else {
    1.43 +#ifndef XP_MACOSX
    1.44 +        document.title = "]]>&privatebrowsingpage.title;<![CDATA[";
    1.45 +#endif
    1.46 +        setFavIcon("chrome://browser/skin/Privacy-16.png");
    1.47 +      }
    1.48 +
    1.49 +      var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
    1.50 +                             .getInterface(Ci.nsIWebNavigation)
    1.51 +                             .QueryInterface(Ci.nsIDocShellTreeItem)
    1.52 +                             .rootTreeItem
    1.53 +                             .QueryInterface(Ci.nsIInterfaceRequestor)
    1.54 +                             .getInterface(Ci.nsIDOMWindow);
    1.55 +
    1.56 +      function setFavIcon(url) {
    1.57 +        var icon = document.createElement("link");
    1.58 +        icon.setAttribute("rel", "icon");
    1.59 +        icon.setAttribute("type", "image/png");
    1.60 +        icon.setAttribute("href", url);
    1.61 +        var head = document.getElementsByTagName("head")[0];
    1.62 +        head.insertBefore(icon, head.firstChild);
    1.63 +      }
    1.64 +
    1.65 +      document.addEventListener("DOMContentLoaded", function () {
    1.66 +        if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
    1.67 +          document.body.setAttribute("class", "normal");
    1.68 +        }
    1.69 +
    1.70 +        // Set up the help link
    1.71 +        let moreInfoURL = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
    1.72 +                          getService(Ci.nsIURLFormatter).
    1.73 +                          formatURLPref("app.support.baseURL");
    1.74 +        let moreInfoLink = document.getElementById("moreInfoLink");
    1.75 +        if (moreInfoLink)
    1.76 +          moreInfoLink.setAttribute("href", moreInfoURL + "private-browsing");
    1.77 +      }, false);
    1.78 +
    1.79 +      function openPrivateWindow() {
    1.80 +        mainWindow.OpenBrowserWindow({private: true});
    1.81 +      }
    1.82 +    ]]></script>
    1.83 +  </head>
    1.84 +
    1.85 +  <body dir="&locale.dir;"
    1.86 +        class="private">
    1.87 +
    1.88 +    <!-- PAGE CONTAINER (for styling purposes only) -->
    1.89 +    <div id="errorPageContainer">
    1.90 +
    1.91 +      <!-- Error Title -->
    1.92 +      <div id="errorTitle">
    1.93 +        <h1 id="errorTitleText" class="showPrivate">&privatebrowsingpage.title;</h1>
    1.94 +        <h1 id="errorTitleTextNormal" class="showNormal">&privatebrowsingpage.title.normal;</h1>
    1.95 +      </div>
    1.96 +
    1.97 +      <!-- LONG CONTENT (the section most likely to require scrolling) -->
    1.98 +      <div id="errorLongContent">
    1.99 +
   1.100 +        <!-- Short Description -->
   1.101 +        <div id="errorShortDesc">
   1.102 +          <p id="errorShortDescText" class="showPrivate">&privatebrowsingpage.perwindow.issueDesc;</p>
   1.103 +          <p id="errorShortDescTextNormal" class="showNormal">&privatebrowsingpage.perwindow.issueDesc.normal;</p>
   1.104 +        </div>
   1.105 +
   1.106 +        <!-- Long Description -->
   1.107 +        <div id="errorLongDesc">
   1.108 +          <p id="errorLongDescText">&privatebrowsingpage.perwindow.description;</p>
   1.109 +        </div>
   1.110 +
   1.111 +        <!-- Start Private Browsing -->
   1.112 +        <div id="startPrivateBrowsingDesc" class="showNormal">
   1.113 +          <button xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   1.114 +                  id="startPrivateBrowsing" label="&privatebrowsingpage.openPrivateWindow.label;"
   1.115 +                  accesskey="&privatebrowsingpage.openPrivateWindow.accesskey;"
   1.116 +                  oncommand="openPrivateWindow();"/>
   1.117 +        </div>
   1.118 +
   1.119 +        <!-- Footer -->
   1.120 +        <div id="footerDesc">
   1.121 +          <p id="footerText" class="showPrivate">&privatebrowsingpage.howToStop3;</p>
   1.122 +          <p id="footerTextNormal" class="showNormal">&privatebrowsingpage.howToStart4;</p>
   1.123 +        </div>
   1.124 +
   1.125 +        <!-- More Info -->
   1.126 +        <div id="moreInfo" class="showPrivate">
   1.127 +          <p id="moreInfoText">
   1.128 +            &privatebrowsingpage.moreInfo;
   1.129 +          </p>
   1.130 +          <p id="moreInfoLinkContainer">
   1.131 +            <a id="moreInfoLink" target="_blank">&privatebrowsingpage.learnMore;</a>
   1.132 +          </p>
   1.133 +        </div>
   1.134 +      </div>
   1.135 +    </div>
   1.136 +
   1.137 +  </body>
   1.138 +</html>

mercurial