From 691ef416166d2e066414bd5b9f1f4a9f071428b3 Mon Sep 17 00:00:00 2001 From: xiu2 <54703944+XIU2@users.noreply.github.com> Date: Wed, 21 Jan 2026 20:39:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E7=BC=96=E7=A0=81GBK?= =?UTF-8?q?=E7=BD=91=E9=A1=B5=E4=B9=B1=E7=A0=81=E7=9A=84=E9=97=AE=E9=A2=98?= =?UTF-8?q?;=20=E4=BC=98=E5=8C=96=20Firefox=20=E6=B5=8F=E8=A7=88=E5=99=A8?= =?UTF-8?q?=E4=B8=8B=E7=BC=96=E7=A0=81=20GBK=20=E7=BD=91=E9=A1=B5=E4=B9=B1?= =?UTF-8?q?=E7=A0=81=E7=9A=84=E5=A4=84=E7=90=86=E6=96=B9=E6=A1=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Autopage.user.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Autopage.user.js b/Autopage.user.js index 170ee93..d632bbf 100644 --- a/Autopage.user.js +++ b/Autopage.user.js @@ -3,7 +3,7 @@ // @name:zh-CN 自动无缝翻页 // @name:zh-TW 自動無縫翻頁 // @name:ru Автостраничник -// @version 6.6.68 +// @version 6.6.69 // @author X.I.U // @description ⭐Append the next page content to the bottom seamlessly (like a waterfall, Unlimited scrolling, no need to manually click on the next page) ⭐, support various forums, social networking, games, comics, novels, academics, search engines (Google, Bing, Yahoo...) and other websites~ // @description:zh-CN ⭐无缝加载 下一页内容 至网页底部(类似瀑布流,无限滚动,无需手动点击下一页)⭐,目前支持:【所有「Discuz!、Flarum、phpBB、MyBB、Xiuno、XenForo、NexusPHP...」论坛】【百度、谷歌(Google)、必应(Bing)、搜狗、微信、360、Yahoo、Yandex 等搜索引擎...】、贴吧、豆瓣、知乎、NGA、V2EX、起点中文、千图网、千库网、Pixabay、Pixiv、3DM、游侠网、游民星空、NexusMods、Steam 创意工坊、CS.RIN.RU、RuTracker、BT之家、萌番组、动漫花园、樱花动漫、爱恋动漫、AGE 动漫、Nyaa、SrkBT、RARBG、SubHD、423Down、不死鸟、扩展迷、小众软件、【动漫狂、动漫屋、漫画猫、漫画屋、漫画 DB、HiComic、Mangabz、Xmanhua 等漫画网站...】、PubMed、Z-Library、GreasyFork、Github、StackOverflow(以上仅一小部分常见网站,更多的写不下了... @@ -1695,6 +1695,7 @@ function: { url: url, method: 'GET', //overrideMimeType: 'text/html; charset=' + (document.characterSet||document.charset||document.inputEncoding), + responseType: 'arraybuffer', // Firefox 浏览器下 Tampermonkey 访问 GBK 网站时会乱码,只能改为 TextDecoder 手动转换编码 headers: { 'x-requested-with': (curSite.xRequestedWith === true) ? 'XMLHttpRequest':null, 'Referer': (curSite.noReferer === true) ? null:location.href, @@ -1706,8 +1707,9 @@ function: { timeout: 5000, onload: function (response) { try { - //console.log('URL:' + url, '最终 URL:' + response.finalUrl, '返回内容:' + response.responseText) - processElems(createDocumentByString(response.responseText)); + //console.log('URL:' + url, '最终 URL:' + response.finalUrl, '返回内容:' + response.responseText, response) + processElems(createDocumentByString((new TextDecoder((document.characterSet||document.charset||document.inputEncoding))).decode(response.response))); + //processElems(createDocumentByString(response.responseText)); } catch (e) { console.error('[自动无缝翻页] - 处理获取到的下一页内容时出现问题,请检查!\n', e, '\nURL:' + url, '\n最终 URL:' + response.finalUrl, '\n返回状态:' + response.statusText, '\n返回内容:' + response.responseText); } @@ -1725,7 +1727,7 @@ function: { } else { const xhr = new XMLHttpRequest(); xhr.open('GET', url, true); - //xhr.overrideMimeType('text/html; charset=' + (document.characterSet||document.charset||document.inputEncoding)); + xhr.overrideMimeType('text/html; charset=' + (document.characterSet||document.charset||document.inputEncoding)); if (curSite.xRequestedWith === true) {xhr.setRequestHeader('x-requested-with', 'XMLHttpRequest')} //(curSite.noReferer === true) ? xhr.setRequestHeader('Referer', ''):xhr.setRequestHeader('Referer', location.href)