您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
try to take over the world!
当前为
// ==UserScript== // @name 妖火热帖 // @namespace https://yaohuo.me/ // @version 0.4 // @description try to take over the world! // @author id:30235 // @match https://yaohuo.me/ // @icon https://yaohuo.me/css/favicon.ico // @grant GM_xmlhttpRequest // @license MIT // @connect yh.jdcc.cf // @connect 127.0.0.1 // @require https://lib.baomitu.com/jquery/3.6.0/jquery.js // ==/UserScript== (function() { let title = document.querySelector('.title'); let a = document.createElement("a"); let span = document.createElement("span"); span.className = "separate"; a.innerText = "热帖"; span.innerText = " "; a.style.cursor="pointer"; title.append(span); title.append(a); a.onclick=function(){ GM_xmlhttpRequest({ url:"https://yh.jdcc.cf:2083/getHot", method:'get', onerror:function(res){ console.log(res.responseText); }, onload:function(res){ let data=res.responseText; data=JSON.parse(data); let rt=""; for(let i=0;i<data["data"].length;i++){ rt+=(i+1)+'.<a href="/bbs-'+data["data"][i][0]+'.html" target="_blank">'+"【"+data["data"][i][4]+"热】"+data["data"][i][3]+'</a><br>'; } rt = '<div class="title"><a href="/">首页</a>><a href="/bbs/">论坛</a>>热帖 更新于:'+data["updateTime"]+'</div>'+'<div class="list">'+rt+'</div>'; $("body").html(''); $("body").append(rt); } }); }; })();