Skip to content

Instantly share code, notes, and snippets.

@shoyuf
Last active April 17, 2025 08:59
Show Gist options
  • Save shoyuf/7a67d62bddb09e18c1678afc6279f3a5 to your computer and use it in GitHub Desktop.
Save shoyuf/7a67d62bddb09e18c1678afc6279f3a5 to your computer and use it in GitHub Desktop.
删除自己的豆瓣广播 delete douban statuses
// 进入到豆瓣广播的列表页,例如:https://www.douban.com/people/******/
// 按 F12 或者 Command + Shift + I
// 进入 Console 界面,粘贴以下代码,按回车确定
// 成功后手动刷新页面,重复以上操作
(function() {
let ck = "";
document.querySelectorAll(".nav-user-account a").forEach(e => {
if (e.href.includes("logout")) {
const url = new URL(e.href);
ck = url.searchParams.get("ck");
}
});
$(".btn-action-reply-delete").each(function() {
const parent = $(this).parents(".new-status[data-sid]");
const id = $(parent).data("sid");
// 取消转发
const unreshare = $(this).data("unreshare") || "";
const sid = unreshare || id;
$.post(
"/j/status/delete",
{
sid,
ck
},
function(r) {
if (r.r == 0) {
console.log("delete success", sid);
parent.hide();
} else {
console.log("delete failed", sid);
}
}
);
});
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment