From 8a252e4c7a340e494a7d314cc05846afc335d1c5 Mon Sep 17 00:00:00 2001 From: hymbz Date: Fri, 23 Aug 2024 16:26:35 +0800 Subject: [PATCH] chore: :bookmark: Release 9.7.2 --- ComicRead-AdGuard.user.js | 19 ++++++++++--------- ComicRead.user.js | 19 ++++++++++--------- docs/.other/CHANGELOG.md | 7 +++++++ docs/.other/LatestChange.md | 4 ++-- package.json | 2 +- 5 files changed, 30 insertions(+), 21 deletions(-) diff --git a/ComicRead-AdGuard.user.js b/ComicRead-AdGuard.user.js index 1804884d..5bcead29 100644 --- a/ComicRead-AdGuard.user.js +++ b/ComicRead-AdGuard.user.js @@ -1,7 +1,7 @@ // ==UserScript== // @name ComicRead // @namespace ComicRead -// @version 9.7.1 +// @version 9.7.2 // @description 为漫画站增加双页阅读、翻译等优化体验的增强功能。百合会(记录阅读历史、自动签到等)、百合会新站、动漫之家(解锁隐藏漫画)、E-Hentai(关联 nhentai、快捷收藏、标签染色、识别广告页等)、nhentai(彻底屏蔽漫画、无限滚动)、Yurifans(自动签到)、拷贝漫画(copymanga)(显示最后阅读记录)、PonpomuYuri、明日方舟泰拉记事社、禁漫天堂、漫画柜(manhuagui)、漫画DB(manhuadb)、动漫屋(dm5)、绅士漫画(wnacg)、mangabz、komiic、无限动漫、新新漫画、hitomi、koharu、kemono、nekohouse、welovemanga // @description:en Add enhanced features to the comic site for optimized experience, including dual-page reading and translation. E-Hentai (Associate nhentai, Quick favorite, Colorize tags, Floating tag list, etc.) | nhentai (Totally block comics, Auto page turning) | hitomi | Anchira | kemono | nekohouse | welovemanga. // @description:ru Добавляет расширенные функции для удобства на сайт, такие как двухстраничный режим и перевод. @@ -7420,7 +7420,7 @@ const request = async (url, details, retryNum = 0, errorNum = 0) => { try { // 虽然 GM_xmlhttpRequest 有 fetch 选项,但在 stay 上不太稳定 // 为了支持 ios 端只能自己实现一下了 - if (details?.fetch ?? (/^(\\/|blob:)/.test(url) || url.startsWith(window.location.origin))) { + if (details?.fetch ?? (url.startsWith('/') || url.startsWith(window.location.origin))) { const res = await fetch(url, { method: 'GET', headers, @@ -7509,12 +7509,15 @@ const MdFileDownload = ((props = {}) => (() => { return _el$; })()); -const Accept = 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8'; - /** 下载按钮 */ const DownloadButton = () => { const [statu, setStatu] = solidJs.createSignal('button.download'); const handleDownload = async () => { + const headers = { + Accept: 'image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8', + 'User-Agent': navigator.userAgent, + Referer: window.location.href + }; const fileData = {}; const { imgList @@ -7530,9 +7533,7 @@ const DownloadButton = () => { let fileName; try { const res = await request(url, { - headers: { - Accept - }, + headers, responseType: 'blob', errorText: \`\${helper.t('alert.download_failed')}: \${index}\` }); @@ -7892,7 +7893,7 @@ const handleVersionUpdate = async () => { _el$.firstChild; web.insert(_el$, () => GM.info.script.version, null); return _el$; - })(), web.template(\`

修复\`)(), web.template(\`