-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathK2N_Blog.js
161 lines (102 loc) · 3.29 KB
/
K2N_Blog.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
// ==UserScript==
// @name K2N Blog Downloader
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author Pitch
// @match https://k2nblog.com/*
// @grant none
// @match https://www.mirrored.to/files/*
// @include https://www.mirrored.to/downlink/*
// @include https://*.zippyshare.com/*
// @include https://www.mediafire.com/file/*
// ==/UserScript==
Find_A_Tag();
function Find_Mirrored() {
var imgs = Array.prototype.slice.apply(document.getElementsByTagName('img')),
resultImgs = [];
for (var i = 0; i < imgs.length; i++) {
if (imgs[i].src.indexOf('https://www.mirrorcreator.com/templates/mirror/images/logo.png') !== -1) {
resultImgs.push(imgs[i]);
}
}
if (resultImgs.length <= 0) {
return false;
} else {
return resultImgs
}
}
function Find_Mediafire() {
var imgs = Array.prototype.slice.apply(document.getElementsByTagName('img')),
resultImgs = [];
for (var i = 0; i < imgs.length; i++) {
if (imgs[i].src.indexOf('https://k2nblog.com/wp-content/images/hostimg/mediafire.png') !== -1) {
resultImgs.push(imgs[i]);
}
}
if (resultImgs.length <= 0) {
return false;
} else {
return resultImgs
}
}
function Find_A_Tag() {
var Mirrored = Find_Mirrored()
var Mediafire = Find_Mediafire();
if (Mirrored != false) {
var Sibling = Mirrored[0].nextSibling;
var found = false;
while (found == false) {
if (Sibling.nodeName == "A" && Sibling.innerHTML == 'ADF.LY') {
found = true;
window.open(Sibling.href, '_blank');
} else {
var Sibling = Sibling.nextSibling
}
}
} else if (Mediafire != false) {
var Sibling = Mediafire[0].nextSibling;
var found = false;
while (found == false) {
if (Sibling.nodeName == "A" && Sibling.innerHTML == 'ADF.LY') {
found = true;
window.open(Sibling.href, '_blank');
} else {
var Sibling = Sibling.nextSibling
}
}
window.close();
}
}
/// K2N Blog Skip 5 Second thing.
if (window.location.href.indexOf("https://k2nblog.com/goto.html") > -1) {
decodedlink();
window.close();
}
/// Mirrored
if (window.location.href.indexOf("mirrored") > -1) {
document.getElementsByClassName("borderedbtn")[0].click();
setTimeout(function () {
window.close();
}, 2500);
setTimeout(function () {
document.getElementsByClassName("get_btn")[0].click();
setTimeout(function () {
window.close();
}, 600);
}, 2000);
}
// Download from zippyshare.
if (window.location.href.indexOf("zippyshare") > -1) {
document.getElementsByClassName("download")[0].click();
setTimeout(function () {
window.close();
}, 800);
}
// Download from Mediafire
if (window.location.href.indexOf("mediafire") > -1) {
document.querySelector('[aria-label="Download file"]').click();
setTimeout(function () {
window.close();
}, 1300);
}