From 28e3c7b47f560db48102bba5b439f82445ef771c Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Mon, 10 Jun 2024 09:57:33 +0800 Subject: [PATCH] Fix notifier.js eslint errors --- chrome/content/zotero/xpcom/notifier.js | 54 ++++++++++++++++--------- 1 file changed, 36 insertions(+), 18 deletions(-) diff --git a/chrome/content/zotero/xpcom/notifier.js b/chrome/content/zotero/xpcom/notifier.js index bd83ea2bc2..e0b7db7de8 100644 --- a/chrome/content/zotero/xpcom/notifier.js +++ b/chrome/content/zotero/xpcom/notifier.js @@ -25,16 +25,33 @@ "use strict"; -Zotero.Notifier = new function(){ +Zotero.Notifier = new function () { // Options that apply to an entire event, not a specific object this.EVENT_LEVEL_OPTIONS = ['autoSyncDelay', 'skipAutoSync']; var _observers = {}; var _types = [ - 'collection', 'search', 'share', 'share-items', 'item', 'file', - 'collection-item', 'item-tag', 'tag', 'setting', 'group', 'trash', - 'bucket', 'relation', 'feed', 'feedItem', 'sync', 'api-key', 'tab', - 'itemtree', 'itempane' + 'collection', + 'search', + 'share', + 'share-items', + 'item', + 'file', + 'collection-item', + 'item-tag', + 'tag', + 'setting', + 'group', + 'trash', + 'bucket', + 'relation', + 'feed', + 'feedItem', + 'sync', + 'api-key', + 'tab', + 'itemtree', + 'itempane' ]; var _transactionID = false; var _queue = {}; @@ -48,11 +65,11 @@ Zotero.Notifier = new function(){ * @returns {string} */ this.registerObserver = function (ref, types, id, priority) { - if (types){ + if (types) { types = Zotero.flattenArguments(types); - for (var i=0; i