Skip to content

Commit

Permalink
v0.5 - quieter errors
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-healey committed Jan 24, 2024
1 parent 92d3f65 commit 88b5e7c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
Binary file modified build/open-inline-citation.xpi
Binary file not shown.
2 changes: 1 addition & 1 deletion src/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const version = "0.4";
const version = "0.5";

if (typeof Zotero == "undefined") {
var Zotero;
Expand Down
7 changes: 3 additions & 4 deletions src/inline-citations.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Description about="urn:mozilla:install-manifest">
<em:id>open-inline-citation@example.com</em:id>
<em:name>Open Inline Citation</em:name>
<em:version>0.4</em:version>
<em:version>0.5</em:version>
<em:multiprocessCompatible>true</em:multiprocessCompatible>
<em:updateURL>https://raw.githubusercontent.com/andrew-healey/open-inline-citation/main/updates.json</em:updateURL>
<em:homepageURL>https://github.com/andrew-healey/open-inline-citation</em:homepageURL>
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -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": {
Expand Down

0 comments on commit 88b5e7c

Please sign in to comment.