Skip to content

Commit

Permalink
fix remove title, add icons
Browse files Browse the repository at this point in the history
  • Loading branch information
izhx committed Apr 6, 2023
1 parent 8b7da64 commit edbf0aa
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 12 deletions.
17 changes: 10 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# easyOA

每天阅读论文,经常各种pdf链接满天飞,很头疼根据自己的需求,编写了 easyOA 插件,它可以:
1. PDF页面重命名为论文标题,方便标签页管理和搜索;
每天阅读论文,经常各种pdf链接满天飞,很头疼根据自己的需求,编写了 `easyOA` 插件,它可以:
1. PDF页面重命名为论文标题,方便标签页管理和搜索,让你的历史记录和 [OneTab](https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall) 页面更清爽
2. 单击图标返回摘要页,摆脱手动修改URL。

Reading papers every day, I often receive various PDF links, which can be quite overwhelming. To meet my own needs, I developed the `easyOA` plugin, which can:
1. Rename PDF pages with the paper title for easier tab management and searching.
1. Rename PDF pages with the paper title for easier tab management and searching, make your browser history and [OneTab](https://chrome.google.com/webstore/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall) page clean.
2. Return to the abstract page with a single click on the icon, eliminating the need for manually modifying the URL.


Expand All @@ -18,18 +18,21 @@ Reading papers every day, I often receive various PDF links, which can be quite
- papers.nips.cc


可能开发的功能 / Possible future developments:
可能的开发计划 / Possible future developments:
1. Download PDF with custom filename in the abstract page.
2. link arxiv for abstract pages on ojs.aaai.org.
3. Edge & Firefox.


## 安装 / Install

之后会上传到 Chrome 应用商店,现在可以下载或克隆到本地,以开发者模式手动安装,参见 [How to install the unpacked extension in Chrome](https://webkul.com/blog/how-to-install-the-unpacked-extension-in-chrome/) (安装时选择本项目下的 `./chrome` 文件夹).
Chrome 应用商店正在审核中,现在可以在 [release](https://github.com/izhx/easy-oa/releases) 页面下载 `crx文件` 手动安装。

> 如果要 debug 或者贡献代码,可以下载或克隆到本地,以开发者模式手动安装,参见 [How to install the unpacked extension in Chrome](https://webkul.com/blog/how-to-install-the-unpacked-extension-in-chrome/) (安装时选择本项目下的 `./chrome` 文件夹).
I am currently trying to upload it to the Chrome Web Store.
For now, you can clone it to your local machine and install it in developer mode.
Under Chrome app store reviewing, and now you can download `crx file` from the [release](https://github.com/izhx/easy-oa/releases) page and install manually.

> For debugging or contributing, you can clone it to your local machine and install it in developer mode.
Refer to [How to install the unpacked extension in Chrome](https://webkul.com/blog/how-to-install-the-unpacked-extension-in-chrome/) (select the `./chrome` folder of this repo).


Expand Down
3 changes: 1 addition & 2 deletions chrome/background.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Add the back to abstract button.

const arxivIdRegex = /\/(\d{4}\.\d{4,5})/;
const mlrPressRegex = /\/[^\/]+$/;
let tabTitles = {};

Expand Down Expand Up @@ -66,7 +65,7 @@ chrome.runtime.onMessage.addListener((request, sender, sendResponse) => {

// Remove the saved title when the tab is closed.
chrome.tabs.onRemoved.addListener((tabId, removeInfo) => {
delete tabTitles[tabId];
if (isPdf(tab.url)) delete tabTitles[tabId];
});


Expand Down
16 changes: 13 additions & 3 deletions chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
{
"name": "easyOA",
"description": "1. PDF back to abstract page; 2. Rename PDF page title;",
"name": "EasyOA",
"description": "1. PDF back to abstract page; 2. Rename PDF page with paper title;",
"version": "0.1",
"manifest_version": 3,
"background": {
"service_worker": "background.js"
},
"action": {
"default_title": "Click to abstract!"
"default_title": "Click to abstract!",
"icons": {
"16": "assets/easyoa-16.png",
"48": "assets/easyoa-48.png",
"128": "assets/easyoa-128.png"
}
},
"icons": {
"16": "assets/easyoa-16.png",
"48": "assets/easyoa-48.png",
"128": "assets/easyoa-128.png"
},
"content_scripts": [
{
Expand Down
Binary file added resources/assets/easyoa-128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/assets/easyoa-16.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/assets/easyoa-48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit edbf0aa

Please sign in to comment.