From bba3335fa73ec807eac5645b69fac36da03b9205 Mon Sep 17 00:00:00 2001 From: izhx Date: Thu, 12 Oct 2023 21:16:18 +0800 Subject: [PATCH] return abs for dl.acm.org --- README.md | 1 + chrome/background.js | 2 ++ chrome/manifest.json | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index a050de8..9b97214 100644 --- a/README.md +++ b/README.md @@ -32,6 +32,7 @@ Reading papers every day, I often receive various PDF links, which can be quite - openaccess.thecvf.com - proceedings.mlr.press - papers.nips.cc +- dl.acm.org 可能的开发计划 / Possible future developments: diff --git a/chrome/background.js b/chrome/background.js index 1e3a074..9a0e1c9 100644 --- a/chrome/background.js +++ b/chrome/background.js @@ -90,6 +90,8 @@ chrome.action.onClicked.addListener(async (tab) => { if (!url.endsWith(".pdf")) { if (url.includes("openreview.net/pdf?id=")) { openAbstract(url.replace("net/pdf?", "net/forum?")); + } else if (url.includes("dl.acm.org/doi/pdf/")) { + openAbstract(url.replace("/pdf/", "/")) } return; diff --git a/chrome/manifest.json b/chrome/manifest.json index 8e0c119..d281a66 100644 --- a/chrome/manifest.json +++ b/chrome/manifest.json @@ -1,7 +1,7 @@ { "name": "EasyOA", "description": "1. PDF back to abstract page; 2. Rename PDF page with paper title;", - "version": "0.2.3", + "version": "0.2.4", "manifest_version": 3, "background": { "service_worker": "background.js" @@ -44,6 +44,7 @@ "https://aclanthology.org/*", "https://openaccess.thecvf.com/content/*", "https://proceedings.mlr.press/*", - "https://papers.nips.cc/*" + "https://papers.nips.cc/*", + "https://dl.acm.org/doi/pdf/*" ] } \ No newline at end of file