您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
// ==UserScript== // @name 百度自动播放脚本 // @namespace http://tampermonkey.net/ // @version 0.3 // @description try to take over the world! // @author You // @match https://www.baidu.com/* // @require https://code.jquery.com/jquery-3.4.1.min.js // ==/UserScript== (function() { 'use strict'; var q=0; var i = 0 function cache(){ var p = []; var po = []; for(var j=0;j<=9;j++){ p[i] = new Image() p[i].src = "http://127.0.0.1/state_img/img.php?qq="+i console.log('xx',p[i].complete) po.push(i) i = i+1; } console.log('已经缓存成功',p) if(Object.keys(p).length==10){ var interval =setInterval(function(){ $("body").css("cssText","background-image:url(http://127.0.0.1/state_img/img.php?qq="+po[q]+") !important") //$("body").css("animation-name","fadein"); q++ if(q==9){ clearInterval(interval); q = 0; cache() } },6000); } } cache() })();