您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
知识星球:阿虚的问答社区
// ==UserScript== // @name 自动展开知识星球帖子+替换图片为原图显示 // @namespace https://axutongxue.com/ // @version 0.1 // @license MIT // @description 知识星球:阿虚的问答社区 // @author 阿虚同学 // @match https://wx.zsxq.com/* // @grant none // ==/UserScript== (function() { 'use strict'; // Function to simulate a mouse click event function simulateClick(element) { var evt = new MouseEvent("click", { bubbles: true, cancelable: true, view: window }); element.dispatchEvent(evt); } // Function to click all elements with the 'showAll' class function clickAllShowAll() { var elements = document.querySelectorAll('p.showAll'); elements.forEach(function(el) { simulateClick(el); }); } // Run the click function when the page loads window.addEventListener('load', function() { // Wait a bit for elements to load (adjust the timeout as necessary) setTimeout(clickAllShowAll, 2000); // Waits for 2 seconds }); // Function to replace the src attribute of images with the href of the corresponding original image links function replaceImageSrc() { // Select all the containers var containers = document.querySelectorAll('.image-container'); containers.forEach(function(container) { // For each container, find the image and the link var image = container.querySelector('img.image'); var link = container.querySelector('a.original-image'); // If both the image and the link exist, replace the image's src with the link's href if (image && link && link.href) { image.src = link.href; } }); } // Run the replace function when the page loads window.addEventListener('load', replaceImageSrc); // If the content is dynamically loaded, you might need to run the function after a certain interval setInterval(replaceImageSrc, 5000); // Runs every 5 seconds })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址