browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

     1 <?xml version="1.0" encoding="UTF-8"?>
     2 <!--
     3 # This Source Code Form is subject to the terms of the Mozilla Public
     4 # License, v. 2.0. If a copy of the MPL was not distributed with this
     5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
     6 -->
     7 <!DOCTYPE html [
     8   <!ENTITY % htmlDTD PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
     9   %htmlDTD;
    10   <!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
    11   %globalDTD;
    12   <!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
    13   %brandDTD;
    14   <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
    15   %browserDTD;
    16   <!ENTITY % privatebrowsingpageDTD SYSTEM "chrome://browser/locale/aboutPrivateBrowsing.dtd">
    17   %privatebrowsingpageDTD;
    18 ]>
    20 <html xmlns="http://www.w3.org/1999/xhtml">
    21   <head>
    22     <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all"/>
    23     <link rel="stylesheet" href="chrome://browser/skin/aboutPrivateBrowsing.css" type="text/css" media="all"/>
    24     <style type="text/css"><![CDATA[
    25       body.normal .showPrivate,
    26       body.private .showNormal {
    27         display: none;
    28       }
    29     ]]></style>
    30     <script type="application/javascript;version=1.7"><![CDATA[
    31       const Cc = Components.classes;
    32       const Ci = Components.interfaces;
    34       Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
    36       if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
    37         document.title = "]]>&privatebrowsingpage.title.normal;<![CDATA[";
    38         setFavIcon("chrome://global/skin/icons/question-16.png");
    39       } else {
    40 #ifndef XP_MACOSX
    41         document.title = "]]>&privatebrowsingpage.title;<![CDATA[";
    42 #endif
    43         setFavIcon("chrome://browser/skin/Privacy-16.png");
    44       }
    46       var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
    47                              .getInterface(Ci.nsIWebNavigation)
    48                              .QueryInterface(Ci.nsIDocShellTreeItem)
    49                              .rootTreeItem
    50                              .QueryInterface(Ci.nsIInterfaceRequestor)
    51                              .getInterface(Ci.nsIDOMWindow);
    53       function setFavIcon(url) {
    54         var icon = document.createElement("link");
    55         icon.setAttribute("rel", "icon");
    56         icon.setAttribute("type", "image/png");
    57         icon.setAttribute("href", url);
    58         var head = document.getElementsByTagName("head")[0];
    59         head.insertBefore(icon, head.firstChild);
    60       }
    62       document.addEventListener("DOMContentLoaded", function () {
    63         if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
    64           document.body.setAttribute("class", "normal");
    65         }
    67         // Set up the help link
    68         let moreInfoURL = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
    69                           getService(Ci.nsIURLFormatter).
    70                           formatURLPref("app.support.baseURL");
    71         let moreInfoLink = document.getElementById("moreInfoLink");
    72         if (moreInfoLink)
    73           moreInfoLink.setAttribute("href", moreInfoURL + "private-browsing");
    74       }, false);
    76       function openPrivateWindow() {
    77         mainWindow.OpenBrowserWindow({private: true});
    78       }
    79     ]]></script>
    80   </head>
    82   <body dir="&locale.dir;"
    83         class="private">
    85     <!-- PAGE CONTAINER (for styling purposes only) -->
    86     <div id="errorPageContainer">
    88       <!-- Error Title -->
    89       <div id="errorTitle">
    90         <h1 id="errorTitleText" class="showPrivate">&privatebrowsingpage.title;</h1>
    91         <h1 id="errorTitleTextNormal" class="showNormal">&privatebrowsingpage.title.normal;</h1>
    92       </div>
    94       <!-- LONG CONTENT (the section most likely to require scrolling) -->
    95       <div id="errorLongContent">
    97         <!-- Short Description -->
    98         <div id="errorShortDesc">
    99           <p id="errorShortDescText" class="showPrivate">&privatebrowsingpage.perwindow.issueDesc;</p>
   100           <p id="errorShortDescTextNormal" class="showNormal">&privatebrowsingpage.perwindow.issueDesc.normal;</p>
   101         </div>
   103         <!-- Long Description -->
   104         <div id="errorLongDesc">
   105           <p id="errorLongDescText">&privatebrowsingpage.perwindow.description;</p>
   106         </div>
   108         <!-- Start Private Browsing -->
   109         <div id="startPrivateBrowsingDesc" class="showNormal">
   110           <button xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
   111                   id="startPrivateBrowsing" label="&privatebrowsingpage.openPrivateWindow.label;"
   112                   accesskey="&privatebrowsingpage.openPrivateWindow.accesskey;"
   113                   oncommand="openPrivateWindow();"/>
   114         </div>
   116         <!-- Footer -->
   117         <div id="footerDesc">
   118           <p id="footerText" class="showPrivate">&privatebrowsingpage.howToStop3;</p>
   119           <p id="footerTextNormal" class="showNormal">&privatebrowsingpage.howToStart4;</p>
   120         </div>
   122         <!-- More Info -->
   123         <div id="moreInfo" class="showPrivate">
   124           <p id="moreInfoText">
   125             &privatebrowsingpage.moreInfo;
   126           </p>
   127           <p id="moreInfoLinkContainer">
   128             <a id="moreInfoLink" target="_blank">&privatebrowsingpage.learnMore;</a>
   129           </p>
   130         </div>
   131       </div>
   132     </div>
   134   </body>
   135 </html>

mercurial