您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Boost website loading speed and video playback while preventing autoplay. This script enhances loading times for images and videos, making it ideal for users with limited internet access. Although it can't increase your internet speed, it ensures a smoother browsing experience. Try this code for improved speed!
当前为
// ==UserScript== // @name Super Fast Loading // @namespace http://tampermonkey.net/ // @version 1.0 // @description Boost website loading speed and video playback while preventing autoplay. This script enhances loading times for images and videos, making it ideal for users with limited internet access. Although it can't increase your internet speed, it ensures a smoother browsing experience. Try this code for improved speed! // @author Farzan Farhangi // @match *://*/* // @grant GM_xmlhttpRequest // @grant GM_setValue // @grant GM_getValue // @homepage https://gf.qytechs.cn/en/scripts/517138-super-fast-loading // ==/UserScript== (function() { 'use strict'; const cacheKeyPrefix = 'cachedResource_'; const simulatedSpeedFactor = 1; // Simulate actual speed for better performance // Load cached resources const loadCachedResource = (url) => { const cachedData = GM_getValue(cacheKeyPrefix + url); if (cachedData) { const script = document.createElement('script'); script.textContent = cachedData; document.head.appendChild(script); return true; } return false; }; // Fetch and cache resources with simulated delay const fetchAndCacheResource = async (url) => { try { await new Promise(resolve => setTimeout(resolve, 1000 / simulatedSpeedFactor)); // Simulate network delay const response = await new Promise((resolve, reject) => { GM_xmlhttpRequest({ method: "GET", url: url, onload: resolve, onerror: reject }); }); if (response.status === 200) { GM_setValue(cacheKeyPrefix + url, response.responseText); const script = document.createElement('script'); script.textContent = response.responseText; document.head.appendChild(script); } } catch (error) { console.error(`Failed to fetch resource: ${url}`, error); } }; // Preload critical resources for faster initial load const preloadCriticalResources = () => { const criticalResources = [ '/index.html', '/styles.css', '/script.js', // Add other critical resources as needed ]; criticalResources.forEach(url => { fetchAndCacheResource(url); }); }; // Optimize initial loading by fetching resources in parallel const optimizeInitialLoad = () => { const initialResources = [ '/index.html', '/styles.css', '/script.js', // Add any other resources that should be loaded initially ]; initialResources.forEach(url => { fetchAndCacheResource(url); // Fetch each resource simultaneously for faster loading }); }; preloadCriticalResources(); optimizeInitialLoad(); })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址