Replies: 2 comments 2 replies
-
I'm not sure if we can define a JS script to fix it, I'll try to ask chatGPT |
Beta Was this translation helpful? Give feedback.
0 replies
-
使用tampermonkey扩展,记得修改@match 为你的网站 // ==UserScript==
// @name 自动展开文章脚本
// @namespace http://tampermonkey.net/
// @version 0.1
// @description 自动点击指定网站上的“查看更多”按钮,实现文章默认展开。
// @author al0ne
// @match https://xxx.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const observer = new MutationObserver((mutations) => {
mutations.forEach((mutation) => {
if (mutation.addedNodes.length) {
const viewMoreButtons = document.querySelectorAll('div.w-full.mt-1 > span > span');
viewMoreButtons.forEach(button => button.click());
}
});
});
const config = { childList: true, subtree: true };
observer.observe(document.body, config);
})(); |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Due to recent update changes the fold is now automatic and looking for before!
Beta Was this translation helpful? Give feedback.
All reactions