-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathbot.html
104 lines (100 loc) · 10.2 KB
/
bot.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="utf-8"/>
<title>BotBro</title>
<style>h2,span{display:inline-block;text-transform:uppercase}.text:focus+span,span{opacity:.6}.custom-checkbox,.login,span{position:relative}.signin,h2,span{text-transform:uppercase}.custom-checkbox:focus,.signin:focus{outline:0}.signin,body{background-color:#d3d3d3;font-family:Montserrat,sans-serif;color:#fff;font-size:14px;letter-spacing:1px}body{background:url(https://golos.rubtc.info/wp-content/uploads/2017/02/hex.jpg) #fff;padding:20px 5px}.login{min-height:560px;width:405px;margin:0;padding:20px;box-shadow:0 30px 60px -5px #000}form{padding-top:80px}.active{border-bottom:2px solid #1161ed;color:#fff}.nonactive{color:rgba(255,255,255,.2)}h2{padding-left:12px;font-size:22px;padding-bottom:5px;letter-spacing:2px;font-weight:100}h2:first-child{padding-left:0}.signin,.text{padding:10px 20px;transition:all .5s ease-in-out}span{font-size:12px;top:-20px;transition:all .5s ease-in-out}.text{border:none;width:89%;display:block;height:40px;border-radius:20px;background:rgba(255,255,255,.1);border:2px solid rgba(255,255,255,0);overflow:hidden;margin-top:15px}.custom-checkbox,input,label{display:inline-block}.text:focus{outline:0;border:2px solid rgba(255,255,255,.5);border-radius:20px;background:rgba(0,0,0,0)}input[type=text],input[type=password]{font-family:Montserrat,sans-serif;color:#fff}input{padding-top:20px;font-size:14px}.custom-checkbox,h2,span{margin-left:20px}.custom-checkbox{-webkit-appearance:none;background-color:rgba(255,255,255,.1);padding:8px;border-radius:2px;top:6px}.custom-checkbox:checked{background-color:rgba(17,97,237,1)}.custom-checkbox:checked:after{content:'\2714';font-size:10px;position:absolute;top:1px;left:4px;color:#fff}#item,a,hr{position:relative}label{padding-top:10px;padding-left:5px}.signin{background-color:#1161ed;color:#FFF;width:100%;display:block;height:39px;border-radius:20px;margin-top:30px;border:none}a,input.text{color:#fff}#err,#item{margin:5px}#nicedata,#nicedata #item,#nicedata #item.anim,#nicedata.bg,.login{transition:1s all ease}.signin:hover{background:#4082f5;box-shadow:0 4px 35px -5px #4082f5;cursor:pointer}hr{border:1px solid rgba(255,255,255,.1);top:85px}#item,#nicedata{border-radius:3px}a{text-decoration:none}#nicedata{background:#05050c;width:700px;min-height:480px;opacity:0;float:right;box-shadow:0 8px 28px #000;padding:10px}#item{padding:10px 5px;background:#1b1a33;font-size:.6rem}#item strong{font-size:1rem}#item:before{content:'';background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFcAAABTCAYAAADqWZt6AAAACXBIWXMAAC4jAAAuIwF4pT92AAAH9klEQVR42u2ceWwUdRTHuUFQFiISouJGIpoYDpFTOSoFQSilHHKIKBj5A0QOjUZJFIocctlChUrLUQql5WwhFFoEHMoRSzlWBMQihEOuoFBAQA7x+X3T12Tc7G5nuzs7u9v545N9u+z+5r3P75x2S4XY2NgKFsZgSbDkWnItLLmWXEuuRRjIbTJxuR2QBrsl1w80nbjCAWh2wTnKuUrqIz/n1y25PtBsUpoqdMruU8RxCfycX+fYklsWsbErKfPiPWo7fQ1x7Ay/zv/OsSVXJ80np2e1+3qtKg5xqfD7+P38OUuuB1p8laFO99EbDhHHeuH38+c4tuS6EjtllWNJ4TXqmZhLiL2GP8ef53YsuRpaTl2tjjx+9JWSdsq93JbT1tiBKqTLvGzi2Ffaz84qFlz83F4u5baavjYl7uAFdUNC7He4XW6fr1Ou5Laevs4RnbSNEo9cIcSGwe0PWLaT49NhL7fNjExbmxnr1Wk7MDWPODaa3snb1esVP8+0ha3ctjMyKevif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FZGq3qdOi2biL8efvrw62t892dUVTTCPLqFtn6wU2Q8x8cwE5ztRlbrwAAAABJRU5ErkJggg==);background-size:cover;width:17px;height:13px;position:absolute;left:-25px}#err{background:#ff6262;padding:3px;border-radius:2px;font-size:.6rem}#nicedata #item{transform:translate3d(0,-100px,0);position:absolute;opacity:0}#nicedata #item.anim{transform:translate3d(0,0,0);opacity:1;position:relative}#nicedata.bg,.login{background:url(https://68.media.tumblr.com/8a90f79fe659fad74559f0bc64934aaa/tumblr_ob43n4qbud1u5vp7wo1_500.gif) center center no-repeat #505050;background-size:cover;display:inline-block;opacity:1}#options.nobg{background:linear-gradient(180deg,#1a4072 0,#23579d)}@media screen and (max-width:1200px){#nicedata{width:600px}}@media screen and (max-width:1100px){#nicedata{width:500px}}@media screen and (max-width:1000px){#nicedata{width:300px}}@media screen and (max-width:800px){#nicedata{width:90%;margin:20px auto;float:none;display:block}.login{max-width:99%;padding:1%;margin:0 auto;display:block}}</style>
<meta name="Description" content="Бот для golos.io - повторяющий голоса автономный куратор. Работает в браузере.">
<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
<link rel="icon" type="image/x-icon" href="https://golos.io/images/favicons/favicon.ico"/>
<script>var indexPage=false,isBlog=false;</script>
<script src="scripts/blog.js"></script>
</head>
<body>
<div id="options" class="login">
<h2 class="active"> Bot Bro </h2>
<h2 class="nonactive">@vik</h2>
<form>
<input id="account" required type="text" class="text" name="account" placeholder="Логин">
<input id="k" type="password" required class="text" name="password" placeholder="Постинг ключ">
<br>
<input id="username" type="text" required class="text" name="username" placeholder="Логин пользователя за которым повторять голоса">
<input id="minutes" type="number" class="text" name="text" min="1" max="1000000" placeholder="Сколько прошедших минут учесть">
<input id="votepower" type="number" class="text" name="text" min="0" max="100" placeholder="Повторять только если сила больше ... %">
</form>
<button onclick="broBot()" class="signin">
Запуск голосования
</button>
<hr>
</div>
<div id="nicedata"></div>
<script>
var votepower = 0;
function broBot() {
var account = document.getElementById("account").value,
k = document.getElementById("k").value,
username = document.getElementById("username").value,
minutes = document.getElementById("minutes").value,
votepower = document.getElementById("votepower").value,
time, starttime, t = 1000,
period = minutes * 60,
utime, start;
function followVote() {
var count = true;
steem.api.getDynamicGlobalProperties(function(err, result) {
starttime = Date.parse(result.time) / t;
});
steem.api.getAccountVotes(username, function(err, result) {
var a = [];
for (var i = 0; i < result.length; i++) {
var arr = result,
start = starttime - period,
ap = arr[i].authorperm,
author = ap.substring(0, ap.indexOf('/')),
permlink = ap.substring(ap.indexOf('/')).substring(1),
power = arr[i].percent,
time = arr[i].time;
utime = Date.parse(time) / t;
if (utime > start) {
a.push({
author: author,
permlink: permlink,
power: power,
utime: utime,
start: start
});
}
}
var summ = a.length;
var i = 0;
var goVote = setInterval(function() {
if (count && summ > 0 && a[i].power / 100 >= votepower) {
votehtml = '<div id="item" class="myJson"><a href="https://golos.io/@' + a[i].author + '"><strong>' + a[i].author + '</strong> ' + a[i].permlink + ' <i>' + a[i].power / 100 + '%</i> </a></div>';
document.getElementById('nicedata').insertAdjacentHTML('afterbegin', votehtml);
steem.broadcast.vote(k, account, a[i].author, a[i].permlink, a[i].power, function(err, result) {
console.log(err,result);
});
i++;
itemShow();
}
if (i == summ) {
count = false;
period = 4;
clearInterval(goVote);
followVote();
}
}, 3000);
});
}
followVote();
function itemShow() {
setTimeout(function() {
document.getElementById("item").classList.add('anim');
}, 200);
}
document.getElementById("nicedata").classList.add('bg');
document.getElementById("options").classList.add('nobg');
}
</script>
</body>
</html>