Skip to content

Commit

Permalink
Merge pull request #9 from yyngfive/mdx-changelog
Browse files Browse the repository at this point in the history
改用mdx编写changelog
  • Loading branch information
yyngfive authored Feb 1, 2025
2 parents 23e0c30 + 7d20324 commit cec213b
Show file tree
Hide file tree
Showing 9 changed files with 1,547 additions and 2,432 deletions.
4 changes: 2 additions & 2 deletions Parsers/oup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ export async function getFiguresFromOUP(): Promise<FiguresData> {
const htmlUrl = img.src
? (img.src as string)
: (img.getAttribute("data-src") as string);
const originElemet = e.querySelector(
const originElement = e.querySelector(
"a.fig-view-orig"
) as HTMLAnchorElement;
fetchOriginUrlParams(originElemet.href).then((originUrl) => {
fetchOriginUrlParams(originElement.href).then((originUrl) => {
const figInfo: FigInfo = {
id,
name,
Expand Down
47 changes: 11 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,49 +13,22 @@ Chrome/Edge 拓展,用于从期刊网站上下载文章附图的原始版本

## 支持的期刊网站

- nature.com (Nature)
- pubs.acs.org (ACS)
- onlinelibrary.wiley.com (Wiley)
- science.org (Science)
- sciencedirect.com (Elsevier)
- academic.oup.com (Oxford)
- pubs.rsc.org (RSC)
- pnas.org (PNAS)
- [Nature](https://nature.com)
- [ACS](https://pubs.acs.org)
- [Wiley](https://onlinelibrary.wiley.com)
- [Science](https://science.org)
- [Elsevier](https://sciencedirect.com)
- [Oxford](https://academic.oup.com)
- [RSC](https://pubs.rsc.org)
- [PNAS](https://pnas.org)

## 功能

- 在一个界面查看文章的所有图片
- 快速预览图片内容
- 同时下载原图与补充材料
- 自动整理下载的图片和文件(暂未完全实现)
- 支持多种期刊网站(Nature,Science,ACS,Wiley,Elsevier,Oxford,PNAS)

## 版本更迭

### 0.3.0

- 增加对Oxford和RSC系列期刊的支持
- 增加对文章PDF下载的支持
- 修复了已知Bug

### 0.2.1

- 修复了已知的 BUG,详见Release页面

### 0.2.0

- 界面优化
- 设置界面
- 文件类型
- 修复了已知的 BUG

### 0.1.3

- 解析器支持:
- Science 网站
- ScienceDirect 网站
- nature 系列网站(文件)
- wiley 网站(文件)
- 支持多种期刊网站

## 已知 BUG

Expand All @@ -65,6 +38,8 @@ Chrome/Edge 拓展,用于从期刊网站上下载文章附图的原始版本
- Edge浏览器的在浏览器中查看Office文件功能会导致插件界面关闭,影响下载到文件夹功能
- 下载功能可能无法正确重命名并创建文件夹
- 下载功能可能没有进度条显示
- Elsevier和Wiley系列期刊网站无法通过插件直接下载正文PDF
- 在RSC网站使用插件时,图片需要等网页图片加载完毕后才可预览

## 开发

Expand Down
60 changes: 0 additions & 60 deletions entrypoints/changelog/ChangeLog.tsx

This file was deleted.

46 changes: 46 additions & 0 deletions entrypoints/changelog/Changelog.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
## 支持的期刊网站

- [Nature](https://nature.com)
- [ACS](https://pubs.acs.org)
- [Wiley](https://onlinelibrary.wiley.com)
- [Science](https://science.org)
- [Elsevier](https://sciencedirect.com)
- [Oxford](https://academic.oup.com)
- [RSC](https://pubs.rsc.org)
- [PNAS](https://pnas.org)

## 使用提示

1. Elsevier、Wiley 等网站的正文 PDF 无法通过插件下载
2. 下载功能可能和浏览器设置或其他插件冲突,并不保证完全可用

## 版本更新

### 0.3.0(最新版本)

- 增加对 Oxford、PNAS 和 RSC 系列期刊的支持
- 增加对文章 PDF 下载的支持(部分出版社)
- 新增了版本更新提示页面

### 0.2.1

- 修复了部分 Nature 系列期刊页面插件显示空图片名称的问题
- 修复了部分 Nature 系列期刊页面插件无法识别补充材料的问题
- 修复了部分 Science 系列期刊页面插件无法显示图片名称的问题
- 修复了部分 ACS 系列期刊特殊文章页面导致插件崩溃的问题
- 修复了部分 ACS 期刊因为补充材料无文件名无法识别的问题

### 0.2.0

- 界面优化
- 设置界面
- 文件类型
- 修复了已知的 BUG

### 0.1.3

- 解析器支持:
- Science 网站
- ScienceDirect 网站
- nature 系列网站(文件)
- wiley 网站(文件)
20 changes: 11 additions & 9 deletions entrypoints/changelog/main.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2024 yyngfive
// Copyright (C) 2024 yyngfive

// Email: chenhye5@outlook.com

Expand All @@ -15,13 +15,15 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

import React from 'react';
import ReactDOM from 'react-dom/client';
import ChangeLog from './ChangeLog.tsx';
import '@/assets/css/style.css';
import React from "react";
import ReactDOM from "react-dom/client";
import Changelog from "./Changelog.mdx";
import "@/assets/css/style.css";

ReactDOM.createRoot(document.getElementById('changelog')!).render(
ReactDOM.createRoot(document.getElementById("changelog")!).render(
<React.StrictMode>
<ChangeLog />
</React.StrictMode>,
);
<article className="prose dark:prose-invert m-6">
<Changelog />
</article>
</React.StrictMode>
);
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
"postinstall": "wxt prepare"
},
"dependencies": {
"@mdx-js/react": "^3.1.0",
"@mdx-js/rollup": "^3.1.0",
"@re-dev/react-truncate": "^0.4.3",
"framer-motion": "^11.14.4",
"react": "^18.3.1",
Expand All @@ -23,7 +25,9 @@
},
"devDependencies": {
"@playwright/test": "^1.49.1",
"@tailwindcss/typography": "^0.5.16",
"@types/chrome": "^0.0.270",
"@types/mdx": "^2.0.13",
"@types/react": "^18.3.16",
"@types/react-dom": "^18.3.5",
"@vitejs/plugin-react-swc": "^3.7.2",
Expand Down
Loading

0 comments on commit cec213b

Please sign in to comment.