跳到正文

科技·工程

你谷控制台小工具

zhoujunchen约 3 分钟
原文
文章信息与版本

文章信息

发布
2025年8月4日
收录
2025年12月12日
更新
2026年11月19日
篇幅
约 3 分钟

版本

  1. v1当前

获取专栏源码:

JavaScript
JSON.parse(document.getElementById('lentille-context').innerText).data.article.content

获取比赛报名人数:

JavaScript
window._feInjection.currentData.contest.totalParticipants

删帖(如果是团队管理员可以删别人的):

JavaScript
r=new XMLHttpRequest();r.open('DELETE',
'https://www.luogu.com.cn/api/discuss/delete/帖子ID'
);r.send();

退团:

JavaScript
fetch("https://www.luogu.com.cn/api/team/exit/69419", {
  "headers": {
    "accept": "application/json, text/plain, */*",
    "x-csrf-token":document.querySelector("meta[name=csrf-token]").content
  },
  "body": null,
  "method": "POST"
});

加团:

JavaScript
fetch("https://www.luogu.com.cn/api/team/join/69419", {
  "headers": {
    "accept": "application/json, text/plain, */*",
    "x-csrf-token":document.querySelector("meta[name=csrf-token]").content
  },
  "body": null,
  "method": "POST"
});

查看别人主页源码:

JavaScript
console.log(_feInstance.currentData.user.introduction)

炸私信:

JavaScript
async function f(u, s) {
    await 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: u,
            content: s,
        }),
        method: "POST",
    });
}
(function() {
    var i;
    for (i = 0; i < 1; ++i) { //调次数
        let x = "%%%";//内容
        f( 991587 , x)//用户 UID
    }
}
)();

滥用者后果自负

原文