Skip to content

Commit

Permalink
🐛修复 English 用户遇到的缩略图增强功能失效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
xuejianxianzun committed Aug 26, 2022
1 parent d17ad7c commit af62978
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 20 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,18 @@ TODO:日语文本需要加粗显示关键字,但是我不懂日语。

优化抓取画师的 API

## 13.5.1 2022/08/27

### 修复 bug:English 用户遇到的缩略图增强功能失效的问题

上个版本的修改导致了此问题,现在修复。

因为用户把 Pixiv 的语言设置为 English 时,URL 会多出 `/en` 的路径,例如:

`https://www.pixiv.net/en/artworks/100761776`

而其他语言没有 `/en` 路径。有时候我没有考虑到这个差异,可能就会出现问题。

## 13.5.0 2022/08/25

### 新增设置项:点击收藏按钮时下载作品
Expand Down
9 changes: 2 additions & 7 deletions dist/js/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -1213,9 +1213,6 @@ class ConvertUgoira {
window.addEventListener(_EVT__WEBPACK_IMPORTED_MODULE_0__["EVT"].list.convertSuccess, () => {
this.complete();
});
window.addEventListener(_EVT__WEBPACK_IMPORTED_MODULE_0__["EVT"].list.readZipError, () => {
this.complete();
});
// 如果转换动图时页面被隐藏了,则显示提示
document.addEventListener('visibilitychange', () => {
this.checkHidden();
Expand Down Expand Up @@ -1626,8 +1623,6 @@ class EVENT {
importSettings: 'importSettings',
/** 当动图转换数量发生变化时触发 */
convertChange: 'convertChange',
/** 当读取/解压 zip 文件出错时触发 */
readZipError: 'readZipError',
/** 当动图转换成功时触发 */
convertSuccess: 'convertSuccess',
/** 指示打开中间面板 */
Expand Down Expand Up @@ -9885,10 +9880,10 @@ class Tools {
}
else {
if (type === 'illusts') {
a = el.querySelector('a[href^="/artworks/"]');
a = el.querySelector('a[href*="/artworks/"]');
}
else {
a = el.querySelector('a[href^="/novel/show"]');
a = el.querySelector('a[href*="/novel/show"]');
}
}
if (!a) {
Expand Down
2 changes: 1 addition & 1 deletion dist/js/content.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Powerful Pixiv Downloader",
"version": "13.5.0",
"version": "13.5.1",
"manifest_version": 2,
"description": "强大的 Pixiv 批量下载器。Powerful Pixiv batch downloader. 強力な Pixiv ダウンローダー。",
"icons": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "powerful-pixiv-downloader",
"version": "13.5.0",
"version": "13.5.1",
"description": "强大的 Pixiv 批量下载器。Powerful Pixiv batch downloader. 強力な Pixiv ダウンローダー。",
"repository": "https://github.com/xuejianxianzun/PixivBatchDownloader",
"author": "xuejianxianzun",
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Powerful Pixiv Downloader",
"version": "13.5.0",
"version": "13.5.1",
"manifest_version": 2,
"description": "强大的 Pixiv 批量下载器。Powerful Pixiv batch downloader. 強力な Pixiv ダウンローダー。",
"icons": {
Expand Down
4 changes: 0 additions & 4 deletions src/ts/ConvertUgoira/ConvertUgoira.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ class ConvertUgoira {
this.complete()
})

window.addEventListener(EVT.list.readZipError, () => {
this.complete()
})

// 如果转换动图时页面被隐藏了,则显示提示
document.addEventListener('visibilitychange', () => {
this.checkHidden()
Expand Down
3 changes: 0 additions & 3 deletions src/ts/EVT.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ class EVENT {
importSettings: 'importSettings',
/** 当动图转换数量发生变化时触发 */
convertChange: 'convertChange',
/** 当读取/解压 zip 文件出错时触发 */
readZipError: 'readZipError',
/** 当动图转换成功时触发 */
convertSuccess: 'convertSuccess',
/** 指示打开中间面板 */
Expand Down Expand Up @@ -191,7 +189,6 @@ class EVENT {
| 'resetSettingsEnd'
| 'exportSettings'
| 'importSettings'
| 'readZipError'
| 'convertSuccess'
| 'openCenterPanel'
| 'closeCenterPanel'
Expand Down
4 changes: 2 additions & 2 deletions src/ts/Tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,9 @@ class Tools {
a = el as HTMLAnchorElement
} else {
if (type === 'illusts') {
a = el.querySelector('a[href^="/artworks/"]') as HTMLAnchorElement
a = el.querySelector('a[href*="/artworks/"]') as HTMLAnchorElement
} else {
a = el.querySelector('a[href^="/novel/show"]') as HTMLAnchorElement
a = el.querySelector('a[href*="/novel/show"]') as HTMLAnchorElement
}
}
if (!a) {
Expand Down

0 comments on commit af62978

Please sign in to comment.