When the following codes are run, it prompt me
[Exception... "Unexpected error" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: chrome://zotero/content/runJS.js line 20 > eval :: <TOP_LEVEL> :: line 8" data: no] in the JS Window of zotero. It becomes normal when I restart zotero, however after some runs, the errors come back.
Does some one know the reason?
Many thanks.
var items = ZoteroPane.getSelectedItems();
var item = items.shift();
var pubTitle = item.getField('publicationTitle');
var url = 'http://sci.justscience.cn/index.php?q=' +
encodeURIComponent(pubTitle) + '&sci=1';
var resp = await Zotero.HTTP.request("GET", url);
var parser = new DOMParser();
var html = parser.parseFromString(
resp.responseText,
"text/html"
);
return html;