-
Notifications
You must be signed in to change notification settings - Fork 0
/
hanzi.html
45 lines (40 loc) · 2.65 KB
/
hanzi.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<!DOCTYPE html>
<html>
<head>
<style type="text/css">
html {
width:100%;
height:100%;
}
body {
margin: 0;
font-size: 15px;
width:100%;
height:100%;
font-family: "Microsoft YaHei", Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, serif;
}
textarea{
min-height: 150px;
width: 75%;
}
</style>
<script>
function get(){
document.querySelector("textarea").value="var pre=\""+document.querySelector(".pre").value+"\";var team=\""+document.querySelector(".team").value+"\";var low="+document.querySelector(".low").value+';var cur=0;function chk(){if(cw().document.querySelectorAll("span.u").length>=2){if(low<=1){var a=cw().document.querySelectorAll(".s_elite1");var n=a.length;var names="";for(var i=0;i<n;i++){names+=a[i].parentElement.previousElementSibling.textContent;}console.log(names);}if(low<=2){var a=cw().document.querySelectorAll(".s_elite2");var n=a.length;var names="";for(var i=0;i<n;i++){names+=a[i].parentElement.previousElementSibling.textContent;}console.log(names);}if(low<=3){var a=cw().document.querySelectorAll(".s_elite3");var n=a.length;var names="";for(var i=0;i<n;i++){names+=a[i].parentElement.previousElementSibling.textContent;}console.log(names);}var str="!test!\\n\\n";for(var i=1;i<=1000;i++)str+=unescape("%u"+Number(Math.floor(Math.random()*(0x9fa5-0x4e00)+0x4e00)).toString(16)+"%u"+Number(Math.floor(Math.random()*(0x9fa5-0x4e00)+0x4e00)).toString(16))+pre+"@"+team+"\\n";document.querySelector("#textdiv>textarea").value=str;document.querySelector(".goBtn").click();cur++;}}var str="!test!\\n\\n";for(var i=1;i<=1000;i++)str+=unescape("%u"+Number(Math.floor(Math.random()*(0x9fa5-0x4e00)+0x4e00)).toString(16)+"%u"+Number(Math.floor(Math.random()*(0x9fa5-0x4e00)+0x4e00)).toString(16))+pre+"@"+team+"\\n";document.querySelector("#textdiv>textarea").value=str;document.querySelector(".goBtn").click();cur++;var si=setInterval(function(){chk()},2000);console.log("开始测号");'
}
</script>
</head>
<body>
<h2>汉字测号脚本</h2>
<p>输入系列(比如xx的文哥@文哥中的“的文哥”):<input type="text" class="pre"></p>
<p>输入战队名:<input type="text" class="team"></p>
<p>输入最低的测号等级(1-3):<input type="text" class="low"></p>
<button onclick="get()">生成脚本</button>
<br>
<textarea class="res" placeholder="脚本代码将会生成在这里"></textarea>
<h3>如何使用?</h3>
<p>1.打开名字竞技场</p>
<p>2.按F12,此时你窗口的右面或下面会出现一个框,点击那个框上面的Console</p>
<p>3.有一个">"形状的图标,点击它右面的空白处,粘贴生成的脚本,按Enter</p>
</body>
</html>