diff --git a/build/open-inline-citation.xpi b/build/open-inline-citation.xpi index 89b13cc..5fa0b7e 100644 Binary files a/build/open-inline-citation.xpi and b/build/open-inline-citation.xpi differ diff --git a/src/bootstrap.js b/src/bootstrap.js index 37719c4..db7beca 100644 --- a/src/bootstrap.js +++ b/src/bootstrap.js @@ -1,4 +1,4 @@ -const version = "0.4"; +const version = "0.5"; if (typeof Zotero == "undefined") { var Zotero; diff --git a/src/inline-citations.js b/src/inline-citations.js index cfa7f75..83c9f8e 100644 --- a/src/inline-citations.js +++ b/src/inline-citations.js @@ -153,8 +153,7 @@ addListeners = async (doDebug = false, oicVersion = null) => { ) ).json(); if (!res.items) { - res.query = query; - alert(JSON.stringify(res)); + throw new Error("No results found"); } const links = res.items.map((i) => i.link); return postprocess(links); @@ -428,14 +427,14 @@ addListeners = async (doDebug = false, oicVersion = null) => { }); }, 500); } catch (err) { - alert(err + "\n" + err.stack); + if(window.doDebug) alert(err + "\n" + err.stack); } }) + ")();"; window.eval(toEval); } catch (err) { - alert(err + "\n" + err.stack); + if(doDebug) alert(err + "\n" + err.stack); } } } diff --git a/src/install.rdf b/src/install.rdf index ec2bd76..07dd4e5 100644 --- a/src/install.rdf +++ b/src/install.rdf @@ -5,7 +5,7 @@ open-inline-citation@example.com Open Inline Citation - 0.4 + 0.5 true https://raw.githubusercontent.com/andrew-healey/open-inline-citation/main/updates.json https://github.com/andrew-healey/open-inline-citation diff --git a/src/manifest.json b/src/manifest.json index fad1113..4fb7cd3 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -1,7 +1,7 @@ { "manifest_version": 2, "name": "Open Inline Citation", - "version": "0.4", + "version": "0.5", "description": "CMD-click any inline citation to read it in a new tab", "homepage_url": "https://github.com/andrew-healey/open-inline-citation", "applications": {