mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-11-11 13:48:23 +02:00
98 lines
3.9 KiB
HTML
98 lines
3.9 KiB
HTML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!--
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
-->
|
|
<!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 % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
|
%brandDTD;
|
|
<!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
|
|
%browserDTD;
|
|
<!ENTITY % aboutPrivateBrowsingDTD SYSTEM "chrome://browser/locale/aboutPrivateBrowsing.dtd">
|
|
%aboutPrivateBrowsingDTD;
|
|
]>
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<link rel="stylesheet" href="chrome://browser/content/aboutPrivateBrowsing.css" type="text/css" media="all"/>
|
|
<script type="application/javascript;version=1.7"><![CDATA[
|
|
const {classes: Cc, interfaces: Ci, utils: Cu} = Components;
|
|
|
|
Cu.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
|
|
|
|
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
document.title = "]]>&aboutPrivateBrowsing.title.normal;<![CDATA[";
|
|
setFavIcon("chrome://global/skin/icons/question-16.png");
|
|
} else {
|
|
#ifndef XP_MACOSX
|
|
document.title = "]]>&aboutPrivateBrowsing.title;<![CDATA[";
|
|
#endif
|
|
setFavIcon("chrome://browser/skin/Privacy-16.png");
|
|
}
|
|
|
|
var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
|
|
.getInterface(Ci.nsIWebNavigation)
|
|
.QueryInterface(Ci.nsIDocShellTreeItem)
|
|
.rootTreeItem
|
|
.QueryInterface(Ci.nsIInterfaceRequestor)
|
|
.getInterface(Ci.nsIDOMWindow);
|
|
|
|
function setFavIcon(url) {
|
|
var icon = document.createElement("link");
|
|
icon.setAttribute("rel", "icon");
|
|
icon.setAttribute("type", "image/png");
|
|
icon.setAttribute("href", url);
|
|
var head = document.getElementsByTagName("head")[0];
|
|
head.insertBefore(icon, head.firstChild);
|
|
}
|
|
|
|
document.addEventListener("DOMContentLoaded", function () {
|
|
if (!PrivateBrowsingUtils.isWindowPrivate(window)) {
|
|
document.body.setAttribute("class", "normal");
|
|
}
|
|
|
|
// Set up the help link
|
|
let learnMoreURL = Cc["@mozilla.org/toolkit/URLFormatterService;1"]
|
|
.getService(Ci.nsIURLFormatter)
|
|
.formatURLPref("app.support.baseURL");
|
|
let learnMore = document.getElementById("learnMore");
|
|
if (learnMore) {
|
|
learnMore.setAttribute("href", learnMoreURL + "private-browsing");
|
|
}
|
|
}, false);
|
|
|
|
function openPrivateWindow() {
|
|
mainWindow.OpenBrowserWindow({private: true});
|
|
}
|
|
]]></script>
|
|
</head>
|
|
|
|
<body dir="&locale.dir;" class="private">
|
|
<div id="pageContainer">
|
|
<h1 class="titleText showPrivate">&aboutPrivateBrowsing.title;</h1>
|
|
<h1 class="titleText showNormal">&aboutPrivateBrowsing.title.normal;</h1>
|
|
|
|
<p class="subtitleText showPrivate">&aboutPrivateBrowsing.subtitle;</p>
|
|
<p class="subtitleText showNormal">&aboutPrivateBrowsing.subtitle.normal;</p>
|
|
|
|
<p class="descriptionText">&aboutPrivateBrowsing.description;</p>
|
|
|
|
<p class="notPrivateText showNormal">&aboutPrivateBrowsing.notPrivate;</p>
|
|
|
|
<button xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
|
class="openPrivate showNormal"
|
|
label="&privatebrowsingpage.openPrivateWindow.label;"
|
|
accesskey="&privatebrowsingpage.openPrivateWindow.accesskey;"
|
|
oncommand="openPrivateWindow();"/>
|
|
<div class="showPrivate">
|
|
<p class="moreInfoText">&aboutPrivateBrowsing.moreInfo;</p>
|
|
<p><a id="learnMore" target="_blank">&aboutPrivateBrowsing.learnMore;</a></p>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html>
|