Bug 565508 - Remove the ugly hacks for copying the right thing from about:privatebrowsing once bug 39098 is fixed; r=dao
--HG-- extra : rebase_source : 5e3986af49096c88f2e038d774cbcc53a26436aa
This commit is contained in:
Родитель
33200bf9a5
Коммит
0c025b68e4
|
@ -53,6 +53,12 @@
|
|||
<head>
|
||||
<link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all"/>
|
||||
<link rel="stylesheet" href="chrome://browser/skin/aboutPrivateBrowsing.css" type="text/css" media="all"/>
|
||||
<style type="text/css"><![CDATA[
|
||||
body.normal .showPrivate,
|
||||
body.private .showNormal {
|
||||
display: none;
|
||||
}
|
||||
]]></style>
|
||||
<script type="application/javascript;version=1.7"><![CDATA[
|
||||
const Cc = Components.classes;
|
||||
const Ci = Components.interfaces;
|
||||
|
@ -96,19 +102,9 @@
|
|||
}
|
||||
|
||||
document.addEventListener("DOMContentLoaded", function () {
|
||||
let selector;
|
||||
if (!pb.privateBrowsingEnabled) {
|
||||
document.body.setAttribute("class", "normal");
|
||||
selector = ".showPrivate";
|
||||
}
|
||||
else {
|
||||
selector = ".showNormal";
|
||||
}
|
||||
|
||||
// Remove hidden elements to avoid bug 39098
|
||||
let elements = document.body.querySelectorAll(selector);
|
||||
for (let i = 0; i < elements.length; ++ i)
|
||||
elements[i].parentNode.removeChild(elements[i]);
|
||||
|
||||
// Set up the help link
|
||||
let moreInfoURL = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
|
||||
|
|
Загрузка…
Ссылка в новой задаче