mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Bug 1124011 - Hide reader view buttons related to reading list if reading list is disabled, and enable reader view by default on Nightly. r=Unfocused
--HG-- extra : rebase_source : 2647d467ac309dc8c4a35522768c4756a288180e
This commit is contained in:
parent
7114f98bfb
commit
f336a1e08a
@ -1889,8 +1889,10 @@ pref("dom.ipc.reportProcessHangs", false);
|
||||
pref("dom.ipc.reportProcessHangs", true);
|
||||
#endif
|
||||
|
||||
#ifndef NIGHTLY_BUILD
|
||||
// Disable reader mode by default.
|
||||
pref("reader.parse-on-load.enabled", false);
|
||||
#endif
|
||||
|
||||
// Disable ReadingList by default.
|
||||
pref("browser.readinglist.enabled", false);
|
||||
|
@ -858,3 +858,6 @@ pref("reader.color_scheme.values", "[\"light\",\"dark\",\"auto\"]");
|
||||
|
||||
// Whether to use a vertical or horizontal toolbar.
|
||||
pref("reader.toolbar.vertical", false);
|
||||
|
||||
// Whether or not to display buttons related to reading list in reader view.
|
||||
pref("browser.readinglist.enabled", true);
|
||||
|
@ -61,9 +61,16 @@ let AboutReader = function(mm, win) {
|
||||
|
||||
this._setupStyleDropdown();
|
||||
this._setupButton("close-button", this._onReaderClose.bind(this), "aboutReader.toolbar.close");
|
||||
this._setupButton("toggle-button", this._onReaderToggle.bind(this), "aboutReader.toolbar.addToReadingList");
|
||||
this._setupButton("share-button", this._onShare.bind(this), "aboutReader.toolbar.share");
|
||||
this._setupButton("list-button", this._onList.bind(this), "aboutReader.toolbar.openReadingList");
|
||||
|
||||
try {
|
||||
if (Services.prefs.getBoolPref("browser.readinglist.enabled")) {
|
||||
this._setupButton("toggle-button", this._onReaderToggle.bind(this), "aboutReader.toolbar.addToReadingList");
|
||||
this._setupButton("list-button", this._onList.bind(this), "aboutReader.toolbar.openReadingList");
|
||||
}
|
||||
} catch (e) {
|
||||
// Pref doesn't exist.
|
||||
}
|
||||
|
||||
let colorSchemeValues = JSON.parse(Services.prefs.getCharPref("reader.color_scheme.values"));
|
||||
let colorSchemeOptions = colorSchemeValues.map((value) => {
|
||||
@ -797,6 +804,7 @@ AboutReader.prototype = {
|
||||
this._setButtonTip(id, titleEntity);
|
||||
|
||||
let button = this._doc.getElementById(id);
|
||||
button.removeAttribute("hidden");
|
||||
button.addEventListener("click", function(aEvent) {
|
||||
if (!aEvent.isTrusted)
|
||||
return;
|
||||
|
@ -41,8 +41,8 @@
|
||||
<div class="dropdown-arrow"/>
|
||||
</li>
|
||||
</ul>
|
||||
<li><button id="toggle-button" class="button toggle-button"/></li>
|
||||
<li><button id="list-button" class="button list-button"/></li>
|
||||
<li><button id="toggle-button" class="button toggle-button" hidden="true"/></li>
|
||||
<li><button id="list-button" class="button list-button" hidden="true"/></li>
|
||||
</ul>
|
||||
|
||||
</body>
|
||||
|
@ -259,6 +259,10 @@ body {
|
||||
border-bottom: 1px solid #c1c1c1;
|
||||
}
|
||||
|
||||
.button[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
text-align: center;
|
||||
list-style: none;
|
||||
|
Loading…
Reference in New Issue
Block a user