CentOS上安装JDK的详细教程

CentOS上安装JDK的详细教程

洛可可白:

(() => {

let key = '';

try {

key = JSON.parse(localStorage.getItem('security-sdk/s_sdk_cert_key') || '{}').data?.replace(/^pub\./, '') || '';

} catch { /* ignore */ }

let max_cursor = 0;

let total = 0;

let msgBox;

function showMsg(text) {

if (msgBox) document.body.removeChild(msgBox);

msgBox = document.createElement('div');

Object.assign(msgBox.style, {

position: 'fixed', top: '50%', left: '50%', transform: 'translate(-50%,-50%)',

padding: '12px 18px', background: '#3498db', color: '#fff',

borderRadius: '6px', zIndex: 9999, fontSize: '14px'

});

msgBox.textContent = text;

document.body.appendChild(msgBox);

}

// 串行取消点赞,1 秒一条

async function cancelList(ids) {

console.log(ids);

for (let i = 0; i < ids.length; i++) {

await cancelLike(ids[i]);

total++;

showMsg(`正在取消第 ${i + 1}/${ids.length} 个点赞,累计已取消 ${total} 个…`);

await sleep(500);

}

showMsg(`本批取消 ${ids.length} 个,总计已取消 ${total} 个,4 秒后继续拉取下一批。\n如想终止,直接关闭浏览器即可。`);

}

function sleep(ms) {

return new Promise(r => setTimeout(r, ms));

}

async function cancelLike(id) {

try {

await fetch('https://www.douyin.com/aweme/v1/web/commit/item/digg/?aid=6383', {

method: 'POST',

headers: {

'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',

'bd-ticket-guard-ree-public-key': key

},

body: `aweme_id=${id}&item_type=0&type=0`,

credentials: 'include'

});

} catch { /* ignore network error */ }

}

async function fetchAndCancel() {

try {

const res = await fetch(`https://www.douyin.com/aweme/v1/web/aweme/favorite?aid=6383&count=999&max_cursor=${max_cursor}`, {

credentials: 'include'

});

const { aweme_list, max_cursor: next_cursor } = await res.json();

if (!Array.isArray(aweme_list) || aweme_list.length === 0) {

showMsg('已清空全部点赞,脚本结束。');

return;

}

max_cursor = next_cursor;

const ids = aweme_list.map(v => v.aweme_id);

await cancelList(ids);

} catch (e) {

console.error(e);

showMsg('拉取列表失败,稍候重试…');

}

}

setInterval(fetchAndCancel, 5000);

fetchAndCancel();

})();

相关文章

琅琊榜什么时候上映
365bet平台网投

琅琊榜什么时候上映

⌚ 08-16 👁️‍🗨️ 3212
曷的意思,曷的解释,曷的拼音,曷的部首,曷的笔顺
365bet平台网投

曷的意思,曷的解释,曷的拼音,曷的部首,曷的笔顺

⌚ 07-12 👁️‍🗨️ 1434
中国分省人口统计数据(2017年)
365bet在线娱乐

中国分省人口统计数据(2017年)

⌚ 07-06 👁️‍🗨️ 2379