// ==UserScript== // @name 妖火热门 // @namespace https://yaohuo.me/ // @version 1.2 // @description 支持pc ,手机端via // @author id:30235 // @match https://yaohuo.me/ // @icon https://yaohuo.me/css/favicon.ico // @license MIT // @connect yh.jdcc.cf // @connect yhw.jdcc.cf // @downloadURL none // ==/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(){ var xhr=new XMLHttpRequest(); xhr.open('get','https://yh.jdcc.cf:2083/getHot'); xhr.onreadystatechange = function () { if (xhr.readyState === 4 && xhr.status === 200) { let res = xhr.responseText; res=JSON.parse(res); let rt=""; for(let key in res["head"]){ if(key!="null") rt+=''+res["head"][key]+''; } for(let i=0;i'+"【"+res["data"][i][4]+"热】"+res["data"][i][3]+''; } rt = '首页>论坛>热门 更新于:'+res["updateTime"]+''+''+rt+''; document.body.innerHTML=rt; } } xhr.send(); }; })();