-
Notifications
You must be signed in to change notification settings - Fork 0
/
YTPals, SubPals, Sonuker.js
120 lines (90 loc) · 5 KB
/
YTPals, SubPals, Sonuker.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
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
// Method 1
// ==UserScript==
// @name Sub4Sub Bot
// @namespace http://tampermonkey.net/
// @version 0.1
// @description idk
// @author Tim2906
// @match https://www.sonuker.com/* https://www.ytpals.com/* https://www.subpals.com/*
// @icon data:image/gif;base64
// @grant none
// ==/UserScript==
(function() {
'use strict';
if (window.location.href.indexOf("members-area/activate") != -1){
var xpath = '/html/body/div[1]/section/div/div/div/div/div/div[2]/div[1]/h2/span/div';
var checkForRemainingVideos = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerHTML;
if (checkForRemainingVideos > 0){
setTimeout(function(){check();}, 2000);
setTimeout(function(){location.reload();}, 3000);
}
if (checkForRemainingVideos < 1){
var confirmButton = document.evaluate('/html/body/div[1]/section/div/div/div/div/div/div[2]/div[2]/div[2]/div/div[2]/div[3]/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
var ytButton = document.evaluate('/html/body/div[1]/section/div/div/div/div/div/div[2]/div[2]/div[2]/div/div[2]/div[1]/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
ytButton.click();
startSub();
setTimeout(function(){confirmButton.click();}, 17000);
}
}
if (window.location.href.indexOf("free-activation-success") != -1){
var activateButton = document.evaluate('/html/body/div[1]/section/div/div[1]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[2]/div[2]/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
location.href = "https://www.ytpals.com/members-area/";
setTimeout(function(){activateButton.click();}, 50000)
setTimeout(function(){location.href="https://www.ytpals.com/members-area/activate"}, 50000);
}
})();
// Method 2
(function() {
'use strict';
var palsID = " ";
var palsPW = " ";
if (window.location.href.indexOf("login") && (document.location.href.indexOf("final") === -1) && (document.location.href.indexOf("activate") === -1))
{
var ytString = document.evaluate('/html/body/div[1]/section/div/div/div/div/div/form/div/input', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
ytString.value = palsID;
if (ytString.value != null)
{
var captchaCheck = document.evaluate('//*[@id="core-wrapper"]/section/div/div/div/div/div/form/div[1]', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if (captchaCheck === null){
var loginButton1 = document.evaluate('/html/body/div[1]/section/div/div/div/div/div/form/button', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
setTimeout(function(){ loginButton1.click(); }, 3000);
}else{
alert("captcha!");
}
}
}
if (window.location.href.indexOf("final") != -1)
{
var password = document.evaluate('/html/body/div[1]/section/div/div/div/div/div/form/div[2]/input', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
password.value = palsPW;
var loginButton2 = document.evaluate('/html/body/div[1]/section/div/div/div/div/div/form/button', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
setTimeout(function(){ loginButton2.click(); }, 3000);
}
if (window.location.href.indexOf("members-area") && (document.location.href.indexOf("activate") === -1))
{
var freeStarter = document.evaluate('/html/body/div[1]/section/div/div[1]/div[2]/div/div/div[2]/div[2]/div[1]/div/div[2]/div[2]/form/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
if (freeStarter != null){
setTimeout(function() { freeStarter.click(); }, 3000);
}
}
if (window.location.href.indexOf("activate") != -1)
{
var xpath = '/html/body/div[1]/section/div/div/div/div/div/div[2]/div[1]/h2/span/div';
var checkForRemainingVideos = document.evaluate(xpath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue.innerHTML;
var confirmButton = document.evaluate('/html/body/div[1]/section/div/div/div/div/div/div[2]/div[2]/div[2]/div/div[2]/div[3]/a', document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue;
function fakeSubscribe(){
setTimeout(function(){ startSub(); }, 5000);
setTimeout(function(){ confirmButton.click(); }, 25000);
setTimeout(function(){ location.reload(); }, 45000);
}
if (checkForRemainingVideos < 1 || -1 > checkForRemainingVideos){
setTimeout(function(){location.reload();},5000);
}
var called = false;
if (!called)
{
called = true;
fakeSubscribe();
}
}
})();