diff --git a/chrome/content/zotero/preferences/preferences_general.xul b/chrome/content/zotero/preferences/preferences_general.xul index 3bffad900e..58c5b8ef19 100644 --- a/chrome/content/zotero/preferences/preferences_general.xul +++ b/chrome/content/zotero/preferences/preferences_general.xul @@ -102,6 +102,7 @@ + diff --git a/chrome/content/zotero/xpcom/reader.js b/chrome/content/zotero/xpcom/reader.js index 5f0c712ca6..f9ffa315f2 100644 --- a/chrome/content/zotero/xpcom/reader.js +++ b/chrome/content/zotero/xpcom/reader.js @@ -172,14 +172,15 @@ class ReaderInstance { } async updateTitle() { + let type = Zotero.Prefs.get('tabs.title.reader'); let item = Zotero.Items.get(this._itemID); let readerTitle = item.getDisplayTitle(); let parentItem = item.parentItem; - if (parentItem) { + // If type is "filename", then readerTitle already has it + if (parentItem && type !== 'filename') { let attachment = await parentItem.getBestAttachment(); if (attachment && attachment.id === this._itemID) { let parts = []; - let type = Zotero.Prefs.get('tabs.title.reader'); let creator = parentItem.getField('firstCreator'); let year = parentItem.getField('year'); let title = parentItem.getDisplayTitle(); diff --git a/chrome/locale/en-US/zotero/preferences.dtd b/chrome/locale/en-US/zotero/preferences.dtd index 42c2e84296..6bd8745c5a 100644 --- a/chrome/locale/en-US/zotero/preferences.dtd +++ b/chrome/locale/en-US/zotero/preferences.dtd @@ -30,6 +30,7 @@ +