-
Notifications
You must be signed in to change notification settings - Fork 1
/
main.js
46 lines (41 loc) · 1.37 KB
/
main.js
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
// 先把视频隐藏了
var i = 0,
msg = 'gaylun.tv 直播整合平台',
href = window.location.href;
if (href.indexOf('quanmin') > 0) {
sendBarrage('asd', 'asd', quanmin())
} else if (href.indexOf('panda') > 0) {
sendBarrage('.room-chat-texta', '.room-chat-send');
} else if (href.indexOf('douyu') > 0) {
sendBarrage('.cs-textarea', '.b-btn');
} else if (href.indexOf('huya') > 0) {
sendBarrage('#pub_msg_input', '#msg_send_bt', function () {
$('#msg_send_bt').addClass('enable');
});
} else if (href.indexOf('zhanqi') > 0) {
zhanqi('.js-chat-msg-input', '.send-btn');
}
function sendBarrage(textareaSelector, sendBtnSelector, beforeFn) {
setInterval(function () {
if (beforeFn) {
beforeFn();
}
i++;
$(textareaSelector).val(msg + i);
$(sendBtnSelector).click();
}, 10000);
}
function zhanqi(textareaSelector, sendBtnSelector) {
setInterval(function () {
i++;
$(textareaSelector).val(msg + i);
$(sendBtnSelector).get(0).click();
}, 20000);
}
function quanmin(i) {
$.ajax({
type: 'POST',
url: 'http://www.quanmin.tv/barrage/sendBarrage?p=5&rid=15&rcat=1&uid=10205139&net=0&screen=3&device=rwduvf64prarqwhnzjtjj1s1cl80lcajhvuung25&refer=room%2F15&sw=1280&sh=800',
data: {"p":{"type":0,"room":i,"text":"gaylun tv 直播整合"}},
});
}