禁止 Web 延迟加载图片(一次性加载)

在 Web 页面中直接显示图片,禁止延迟加载,一次性加载所有图片

当前为 2023-09-22 提交的版本,查看 最新版本

// ==UserScript==
// @name         禁止 Web 延迟加载图片(一次性加载)
// @name:en         Disable web lazy loading images (one-time loading)
// @description  在 Web 页面中直接显示图片,禁止延迟加载,一次性加载所有图片
// @description:en Display images directly on the web page, disable lazy loading, load all images at once.
// @version      0.5.1
// @author       DUN
// @match        *://*/*
// @run-at       document-idle
// @namespace https://gf.qytechs.cn/users/662094
// ==/UserScript==

(function() {
    // 处理所有 img 元素的 src 属性
    var images = document.querySelectorAll('img[data-src]');
    for (var i = 0; i < images.length; i++) {
        var img = images[i];
        var dataSrc = img.getAttribute('data-src');
        if (dataSrc) {
            img.setAttribute('src', dataSrc);
            img.removeAttribute('data-src');
        }
    }
})();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址