洛谷消息轰炸机

Run Settings
LanguageJavaScript
Language Version
Run Command
function sleep(time){return new Promise((resolve)=>setTimeout(resolve,time));}async function send(id,message,count){for(let i=1;i<=count;i++){fetch("https://www.luogu.com.cn/api/chat/new",{headers:[["content-type","application/json"],["referer","https://www.luogu.com.cn"],["x-csrf-token",document.querySelector("meta[name=csrf-token]").content]],body:JSON.stringify({user:id,content:message}),method:"POST"});await sleep(5000)}} // 使用说明: // 1.在浏览器中打开https://www.luogu.com.cn,并登录账号 // 2.打开浏览器控制台,输入上面的代码 // 3.输入send(被轰炸人的id,"轰炸使用的消息",轰炸次数),并按下回车
Editor Settings
Theme
Key bindings
Full width
Lines