diff --git a/background/background.ts b/background/background.ts index 534c97e..3009b31 100644 --- a/background/background.ts +++ b/background/background.ts @@ -190,6 +190,7 @@ chrome.runtime.onMessage.addListener((message, sender, sendResponse) => { sendResponse(`done ${message['paperId']}`) } else { handleTabMessage(message, sender, sendResponse) + return true } } catch (err) { submitError({ diff --git a/content_scripts/content.ts b/content_scripts/content.ts index cf3a9a7..f6ec6f4 100644 --- a/content_scripts/content.ts +++ b/content_scripts/content.ts @@ -110,7 +110,6 @@ function setup() { chrome.runtime.onMessage.addListener( (message, sender, sendResponse) => { try { - window['labml_links'] = message updateIndicator(message) LOGGER.log('tab message', message) sendResponse('got it') diff --git a/content_scripts/papers.ts b/content_scripts/papers.ts index 7a3302d..61d06d9 100644 --- a/content_scripts/papers.ts +++ b/content_scripts/papers.ts @@ -171,12 +171,15 @@ export function addIndicator( } export function updateIndicator(papers: { [link: string]: PaperModel }) { + let linksToSave: string[] = [] for (let link of links) { if (papers[link.link] == null) { continue } + linksToSave.push(link.link) link.paper.loadFrom(papers[link.link]) link.update() } + window['labml_links'] = linksToSave } diff --git a/manifest.json b/manifest.json index 98af252..1023fef 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "48": "assets/icon48.png", "128": "assets/icon128.png" }, - "version": "1.1.0", + "version": "1.1.1", "description": "\uD83D\uDD0E View information about research papers linked from websites you visit.", "background": { "service_worker": "js/background.js" diff --git a/package-lock.json b/package-lock.json index 9113569..8b081e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "papers_extension", - "version": "1.1.0", + "version": "1.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "papers_extension", - "version": "1.1.0", + "version": "1.1.1", "devDependencies": { "@types/chrome": "latest", "copy-webpack-plugin": "^10.0.0", diff --git a/package.json b/package.json index dece027..2febda3 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "build": "webpack --config webpack/webpack.prod.js", "prepare": "husky install" }, - "version": "1.1.0", + "version": "1.1.1", "lint-staged": { "**/*": "" }