名字后面加蛋糕!
手动设置
原理就是设置生日啦,皇更新了论坛功能,如果当天日期和设置的生日日期相同,名字后面就会出现
小尾巴。
手动设置方法:
个人主页 → 偏好设置 → 个人资料 → 出生日期
今天是2024年2月29日就设置二月29
控制台修改
抛砖引玉!控制台自动修改生日为今日,等一个佬改进!
使用步骤如下:
- 设置中先修改成非今日(如果本来就没设置或本来就没有蛋糕,请跳过这一步)
- 使用
F12(Windows、Linux) 或Command + Option + I(macOS) 打开控制台输入以下代码试试能否修改成功?
let preloadedData = document.querySelector('#data-preloaded').getAttribute('data-preloaded');
preloadedData = JSON.parse(preloadedData);
preloadedCurrentUserData = JSON.parse(preloadedData.currentUser);
let username = preloadedCurrentUserData.username;
let today = new Date();
let todayFormated = `${today.getFullYear()}-${today.getMonth() + 1}-${today.getDate()}`;
let csrfToken = document.querySelector('meta[name="csrf-token"]').getAttribute('content');
fetch(`https://linux.do/u/${username}.json`, {
"headers": {
"accept": "*/*",
"accept-language": "zh-CN,zh;q=0.9,en;q=0.8",
"cache-control": "no-cache",
"content-type": "application/x-www-form-urlencoded; charset=UTF-8",
"discourse-logged-in": "true",
"discourse-present": "true",
"pragma": "no-cache",
"x-csrf-token": csrfToken,
"x-requested-with": "XMLHttpRequest"
},
"body": `date_of_birth=${todayFormated}`,
"method": "PUT",
"mode": "cors",
"credentials": "include"
});

