Greasy Fork is available in English.
在 Web 页面中直接显示图片,禁止延迟加载,一次性加载所有图片
当前为
// ==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 http://greasyfork.icu/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');
}
}
})();