From 29c046093070f64060410b304522a5e78d212ae7 Mon Sep 17 00:00:00 2001 From: windingwind <33902321+windingwind@users.noreply.github.com> Date: Tue, 2 Apr 2024 04:58:55 +0800 Subject: [PATCH] Fix ZoteroPane#loadURI with zotero: URLs (#3904) --- chrome/content/zotero/zoteroPane.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/chrome/content/zotero/zoteroPane.js b/chrome/content/zotero/zoteroPane.js index 55375d7980..bd5cb6cac4 100644 --- a/chrome/content/zotero/zoteroPane.js +++ b/chrome/content/zotero/zoteroPane.js @@ -3981,9 +3981,8 @@ var ZoteroPane = new function() // Handle no-content zotero: URLs (e.g., zotero://select) without opening viewer if (uri.startsWith('zotero:')) { let nsIURI = Services.io.newURI(uri, null, null); - let handler = Components.classes["@mozilla.org/network/protocol;1?name=zotero"] - .getService(); - let extension = handler.wrappedJSObject.getExtension(nsIURI); + let handler = Services.io.getProtocolHandler("zotero").wrappedJSObject; + let extension = handler.getExtension(nsIURI); if (extension.noContent) { extension.doAction(nsIURI); return;