Add Filename option for PDF tab title pref
This commit is contained in:
parent
382bde0fc2
commit
a78860f092
1 changed files with 3 additions and 2 deletions
|
@ -172,14 +172,15 @@ class ReaderInstance {
|
||||||
}
|
}
|
||||||
|
|
||||||
async updateTitle() {
|
async updateTitle() {
|
||||||
|
let type = Zotero.Prefs.get('tabs.title.reader');
|
||||||
let item = Zotero.Items.get(this._itemID);
|
let item = Zotero.Items.get(this._itemID);
|
||||||
let readerTitle = item.getDisplayTitle();
|
let readerTitle = item.getDisplayTitle();
|
||||||
let parentItem = item.parentItem;
|
let parentItem = item.parentItem;
|
||||||
if (parentItem) {
|
// If type is "filename", then readerTitle already has it
|
||||||
|
if (parentItem && type !== 'filename') {
|
||||||
let attachment = await parentItem.getBestAttachment();
|
let attachment = await parentItem.getBestAttachment();
|
||||||
if (attachment && attachment.id === this._itemID) {
|
if (attachment && attachment.id === this._itemID) {
|
||||||
let parts = [];
|
let parts = [];
|
||||||
let type = Zotero.Prefs.get('tabs.title.reader');
|
|
||||||
let creator = parentItem.getField('firstCreator');
|
let creator = parentItem.getField('firstCreator');
|
||||||
let year = parentItem.getField('year');
|
let year = parentItem.getField('year');
|
||||||
let title = parentItem.getDisplayTitle();
|
let title = parentItem.getDisplayTitle();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue