-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
135 lines (112 loc) · 4.88 KB
/
index.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
document.onreadystatechange = function () {
if (document.readyState === "complete") {
createFormIcon()
// createForm()
}
}
function loadxchng() {
var scrpt_exchng = document.createElement('script');
scrpt_exchng.type = 'text/javascript';
// scrpt_exchng.src = '//stagepublisher.torcai.com/ad-server/v2/js/xchng.js';
scrpt_exchng.src = './xchng.orig.js'
// scrpt_exchng.src = '../xchng.js';
document.body.append(scrpt_exchng);
scrpt_exchng.onload = function () {
var allElements = document.querySelectorAll("[id='ionAdTagScript']");
for (var i = 0; i < allElements.length; i++) {
callAdtagUrl(allElements[i]);
}
}
}
function createFormIcon() {
var my_awesome_script = document.createElement('script');
my_awesome_script.setAttribute('src', 'https://kit.fontawesome.com/a076d05399.js');
my_awesome_script.setAttribute('content', "width=device-width, initial-scale=1")
document.head.appendChild(my_awesome_script);
var i = document.createElement("i");
i.setAttribute("class", 'fas fa-comment-dots');
// i.setAttribute('style', 'font-size:48px;color:rgb(240,127,32)');
i.style.cssText = 'position:fixed;right:1px;bottom:2px;width:100px;height:50px;z-index:1111;font-size:48px;color:rgb(240,127,32);cursor: -webkit-grab; cursor: grab';
i.addEventListener("click", e=>createForm(e, i))
document.getElementsByTagName("body")[0]
.appendChild(i);
}
function createForm(e, i) {
i.style.display = "none"
var br = document.createElement("br");
var form = document.createElement("form");
form.setAttribute("method", "POST");
form.setAttribute("action", "https://script.google.com/macros/s/AKfycbyDqOiQXWOAZuQqqeNe2He3ju6SYed_qxGRdm87GVkw3vQs7JowNFAdpXTxzTuJYK7E/exec");
form.style.cssText = 'position:fixed;right:1px;bottom:2px;width:160px;height:80px;z-index:1111;';
// Create an input element for Full Name
var FN = document.createElement("input");
FN.setAttribute("type", "text");
FN.setAttribute("name", "Name");
FN.setAttribute("placeholder", "Full Name");
// Create an input element for date of birth
// var DOB = document.createElement("input");
// DOB.setAttribute("type", "text");
// DOB.setAttribute("name", "dob");
// DOB.setAttribute("placeholder", "DOB");
// Create an input element for emailID
var EID = document.createElement("input");
EID.setAttribute("type", "text");
EID.setAttribute("name", "Email");
EID.setAttribute("placeholder", "E-Mail ID");
// Create an input element for password
// var PWD = document.createElement("input");
// PWD.setAttribute("type", "password");
// PWD.setAttribute("name", "password");
// PWD.setAttribute("placeholder", "Password");
// Create an input element for retype-password
// var RPWD = document.createElement("input");
// RPWD.setAttribute("type", "password");
// RPWD.setAttribute("name", "reTypePassword");
// RPWD.setAttribute("placeholder", "ReEnter Password");
// create a submit button
var s = document.createElement("input");
var x = document.createElement("a");
x.innerHTML = "X"
x.style.cssText = 'position:fixed;right:5px;bottom:90px;width:auto;height:auto;z-index:1111;cursor: -webkit-grab; cursor: grab;text-decoration: none';
// position:fixed;right:1px;bottom:2px;width:160px;height:80px;z-index:1111
s.setAttribute("type", "submit");
s.setAttribute("value", "Submit");
// x.setAttribute("type", "cancel");
// x.setAttribute("value", "Cancel");
x.addEventListener("click", e=>hideForm(e, form));
// Append the full name input to the form
form.appendChild(FN);
// Inserting a line break
form.appendChild(br.cloneNode());
// Append the DOB to the form
// form.appendChild(DOB);
// form.appendChild(br.cloneNode());
// Append the emailID to the form
form.appendChild(EID);
form.appendChild(br.cloneNode());
// Append the Password to the form
// form.appendChild(PWD);
// form.appendChild(br.cloneNode());
// Append the ReEnterPassword to the form
// form.appendChild(RPWD);
// form.appendChild(br.cloneNode());
// Append the submit button to the form
form.appendChild(s);
document.getElementsByTagName("body")[0]
.appendChild(form);
form.appendChild(x);
// var down = document.getElementById("123");
}
const hideForm = (e, form) => {
form.style.display = "none";
createFormIcon();
}
const submit = (e) => {
e.preventDefault()
console.log("CEYCEol");
//Deployment ID
// AKfycbxHQzjcs8EjuTgKXEagA_rLjV_9-FbvZaYX53OPIGUPy6vgRNV7bNwCqITLmqzjzz2o
// AKfycbyDqOiQXWOAZuQqqeNe2He3ju6SYed_qxGRdm87GVkw3vQs7JowNFAdpXTxzTuJYK7E
//submit Address
// https://script.google.com/macros/s/AKfycbxHQzjcs8EjuTgKXEagA_rLjV_9-FbvZaYX53OPIGUPy6vgRNV7bNwCqITLmqzjzz2o/exec
}