2 Star 2 Fork 6

xyf007/namerena_scripts

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
test.html 2.10 KB
一键复制 编辑 原始数据 按行查看 历史
xyf007 提交于 2020-12-17 13:23 . fix i.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>&#x5355;&#x4EBA;&#x8BC4;&#x5206;</title>
</head>
<body>
<p>10%</p>
<pre>
const all = document.querySelector('#textdiv>textarea').value.split('\n');
let j = 0;
let fi = 0;
/**
* Get the score of a name.
*/
function check() {
if (fi) {
return;
}
if (cw().document.querySelectorAll('span.u').length <= 10) {
setTimeout(() => {
check();
}, 1000);
return;
}
const val = parseInt(cw().document.querySelectorAll('span.u')[10].textContent
.split(' ')[2]);
if (val >= 6800) {
console.log(`${all[j]} ${val}`);
}
j++;
reload();
setTimeout(() => {
check();
}, 1000);
}
/**
* Reload names.
*/
function reload() {
if (j < all.length) {
document.querySelector('#textdiv>textarea').value = `!test!\n\n${all[j]}`;
document.querySelector('.goBtn').click();
} else {
alert('&#x6D4B;&#x8BD5;&#x5DF2;&#x5B8C;&#x6210;');
fi = 1;
}
}
reload();
check();
</pre>
<p>100%</p>
<pre>
const all = document.querySelector('#textdiv>textarea').value.split('\n');
let j = 0;
let fi = 0;
/**
* Get the score of a name.
*/
function check() {
if (fi) {
return;
}
if (cw().document.querySelectorAll('span.u').length <= 100) {
setTimeout(() => {
check();
}, 1000);
return;
}
const progress = cw().document.querySelectorAll('span.u');
let pos = -1;
for (let i = 100; i < progress.length; i++) {
const element = progress[i];
if (element.textContent.split(' ')[0] === '》') {
pos = i;
break;
}
}
if (pos == -1) {
setTimeout(() => {
check();
}, 1000);
return;
}
const val = parseInt(progress[pos].textContent.split(' ')[2]);
if (val >= 6800) {
console.log(all[j] + ' ' + val);
}
j++;
reload();
setTimeout(() => {
check();
}, 60000);
}
/**
* Reload.
*/
function reload() {
if (j < all.length) {
document.querySelector('#textdiv>textarea').value = '!test!\n\n' + all[j];
document.querySelector('.goBtn').click();
} else {
alert('测试已完成');
fi = 1;
}
}
reload();
check();
</pre>
</body>
</html>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
JavaScript
1
https://gitee.com/xyf0076/namerena_scripts.git
git@gitee.com:xyf0076/namerena_scripts.git
xyf0076
namerena_scripts
namerena_scripts
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385