Change pref from reader.useDarkModeForContent
to reader.contentDarkMode
This commit is contained in:
parent
620b35ab78
commit
613a907f3e
4 changed files with 6 additions and 6 deletions
|
@ -557,7 +557,7 @@ const ZoteroStandalone = new function() {
|
||||||
}
|
}
|
||||||
this.updateMenuItemCheckmark('view-menuitem-split-vertically', reader.splitType === 'vertical');
|
this.updateMenuItemCheckmark('view-menuitem-split-vertically', reader.splitType === 'vertical');
|
||||||
this.updateMenuItemCheckmark('view-menuitem-split-horizontally', reader.splitType === 'horizontal');
|
this.updateMenuItemCheckmark('view-menuitem-split-horizontally', reader.splitType === 'horizontal');
|
||||||
this.updateMenuItemCheckmark('view-menuitem-use-dark-mode-for-content', Zotero.Prefs.get('reader.useDarkModeForContent'));
|
this.updateMenuItemCheckmark('view-menuitem-use-dark-mode-for-content', Zotero.Prefs.get('reader.contentDarkMode'));
|
||||||
this.updateMenuItemEnabled('view-menuitem-use-dark-mode-for-content', window.matchMedia('(prefers-color-scheme: dark)').matches);
|
this.updateMenuItemEnabled('view-menuitem-use-dark-mode-for-content', window.matchMedia('(prefers-color-scheme: dark)').matches);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -215,7 +215,7 @@ class ReaderInstance {
|
||||||
...Zotero.Intl.getPrefixedStrings('pdfReader.')
|
...Zotero.Intl.getPrefixedStrings('pdfReader.')
|
||||||
},
|
},
|
||||||
showAnnotations: true,
|
showAnnotations: true,
|
||||||
useDarkModeForContent: Zotero.Prefs.get('reader.useDarkModeForContent'),
|
useDarkModeForContent: Zotero.Prefs.get('reader.contentDarkMode'),
|
||||||
fontFamily: Zotero.Prefs.get('reader.ebookFontFamily'),
|
fontFamily: Zotero.Prefs.get('reader.ebookFontFamily'),
|
||||||
onOpenContextMenu: () => {
|
onOpenContextMenu: () => {
|
||||||
// Functions can only be passed over wrappedJSObject (we call back onClick for context menu items)
|
// Functions can only be passed over wrappedJSObject (we call back onClick for context menu items)
|
||||||
|
@ -508,7 +508,7 @@ class ReaderInstance {
|
||||||
this._prefObserverIDs = [
|
this._prefObserverIDs = [
|
||||||
Zotero.Prefs.registerObserver('fontSize', this._handleFontSizeChange),
|
Zotero.Prefs.registerObserver('fontSize', this._handleFontSizeChange),
|
||||||
Zotero.Prefs.registerObserver('tabs.title.reader', this._handleTabTitlePrefChange),
|
Zotero.Prefs.registerObserver('tabs.title.reader', this._handleTabTitlePrefChange),
|
||||||
Zotero.Prefs.registerObserver('reader.useDarkModeForContent', this._handleContentDarkModeChange),
|
Zotero.Prefs.registerObserver('reader.contentDarkMode', this._handleContentDarkModeChange),
|
||||||
Zotero.Prefs.registerObserver('reader.ebookFontFamily', this._handleFontFamilyChange),
|
Zotero.Prefs.registerObserver('reader.ebookFontFamily', this._handleFontFamilyChange),
|
||||||
];
|
];
|
||||||
|
|
||||||
|
@ -835,7 +835,7 @@ class ReaderInstance {
|
||||||
};
|
};
|
||||||
|
|
||||||
_handleContentDarkModeChange = () => {
|
_handleContentDarkModeChange = () => {
|
||||||
this._internalReader.useDarkModeForContent(Zotero.Prefs.get('reader.useDarkModeForContent'));
|
this._internalReader.useDarkModeForContent(Zotero.Prefs.get('reader.contentDarkMode'));
|
||||||
};
|
};
|
||||||
|
|
||||||
_handleFontFamilyChange = () => {
|
_handleFontFamilyChange = () => {
|
||||||
|
|
|
@ -520,7 +520,7 @@
|
||||||
class="menu-type-reader"
|
class="menu-type-reader"
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
data-l10n-id="reader-use-dark-mode-for-content"
|
data-l10n-id="reader-use-dark-mode-for-content"
|
||||||
oncommand="Zotero.Prefs.set('reader.useDarkModeForContent', !Zotero.Prefs.get('reader.useDarkModeForContent'))"
|
oncommand="Zotero.Prefs.set('reader.contentDarkMode', !Zotero.Prefs.get('reader.contentDarkMode'))"
|
||||||
/>
|
/>
|
||||||
<menuseparator class="menu-type-reader"/>
|
<menuseparator class="menu-type-reader"/>
|
||||||
<menu id="layout-menu" label="&layout.label;">
|
<menu id="layout-menu" label="&layout.label;">
|
||||||
|
|
|
@ -219,7 +219,7 @@ pref("extensions.zotero.scaffold.eslint.enabled", true);
|
||||||
pref("extensions.zotero.tabs.title.reader", "titleCreatorYear");
|
pref("extensions.zotero.tabs.title.reader", "titleCreatorYear");
|
||||||
|
|
||||||
// Reader
|
// Reader
|
||||||
pref("extensions.zotero.reader.useDarkModeForContent", true);
|
pref("extensions.zotero.reader.contentDarkMode", true);
|
||||||
pref("extensions.zotero.reader.ebookFontFamily", "Georgia, serif");
|
pref("extensions.zotero.reader.ebookFontFamily", "Georgia, serif");
|
||||||
|
|
||||||
// Set color scheme to auto by default
|
// Set color scheme to auto by default
|
||||||
|
|
Loading…
Reference in a new issue