-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscriptMain.js
More file actions
85 lines (81 loc) · 2.86 KB
/
Copy pathscriptMain.js
File metadata and controls
85 lines (81 loc) · 2.86 KB
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
$(function() {
$.ajax({
type: "GET",
url: "https://www.fxp.co.il",
crossDomain: true,
async: true,
dataType: "html",
success: function(data, status, xhr) {
var token;
var avatarPicture = $(data).find("img").filter(".avatar")[0];
var avatarText = $(data).find("span").filter(".log_in6").find("a").find("b")[0];
var avatarElement = document.getElementsByClassName("avatar")[0];
var avatarTextElement = document.getElementsByClassName("avatar-text")[0];
var arr = data.split("\n");
for(var i = 0; i < arr.length; i++) {
if(arr[i].includes("SECURITYTOKEN")) {
token = arr[i];
break;
}
}
token = token.replace("var SECURITYTOKEN = ", "").replace('"', '').replace(";", "");
token = token.replace(token[token.length - 1], "").replace(token[token.length - 2], "");
avatarElement.src = avatarPicture.src;
avatarTextElement.innerHTML = avatarText.innerHTML;
$("#token").val(token);
}
});
$("#copyBtn").click(function() {
var dummy = document.createElement("textarea");
document.body.appendChild(dummy);
dummy.value = $("#token").val();
dummy.select();
document.execCommand("copy");
document.body.removeChild(dummy);
});
$("#testBtn").click(function() {
/*$.ajax({
type: "GET",
url: "https://www.fxp.co.il/showthread.php?t=20344538",
crossDomain: true,
async: true,
dataType: "html",
success: function(data, status, xhr) {
var likeElements = $(data).find("span");
var arr = data.split("\n");
for(var i = 0; i < likeElements.length; i++) {
if(likeElements[i].getAttribute("onclick") == "makelike(this.id);") {
likeElements[i].click();
console.log("Liked!");
}
}
}
});*/
});
/*$.ajax({
type: "POST",
url: "https://pastebin.com/post.php",
crossDomain: true,
async: true,
data: {
submit_hidden: "submit_hidden",
paste_code: "asdsadsadsa",
paste_format: 1,
paste_expire_date: "N",
paste_private: 0,
paste_name: ""
},
dataType: "html",
success: function(data) {
var texts = $(data).find("div").find("ol").find("li");
console.log(data);
}
});*/
});
function testFunction() {
var counter = 0;
while(counter < 50) {
console.log(Hello);
counter++;
}
}