-
Notifications
You must be signed in to change notification settings - Fork 0
/
script.js
33 lines (31 loc) · 1.19 KB
/
script.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
function totalItv() {
var input = document.getElementsByName("values");
let listOfApps = "";
let finalLink = "curl -fsSL https://raw.githubusercontent.com/i3p9/Jumpstart/main/files/jumpstart.sh | bash -s "
for (var i=0; i<input.length; i++){
if (input[i].checked){
// console.log(input[i].value)
listOfApps = listOfApps + ' ' +(input[i].value);
}
}
console.log(listOfApps)
finalLink = finalLink + (listOfApps)
document.getElementsByName("generatedLink")[0].value = finalLink;
}
function clearAll() {
var input = document.getElementsByName("values");
for (var i=0; i<input.length; i++){
if (input[i].checked){
document.getElementById(input[i].id).checked = false;
}
}
}
function toClipboard(){
var copyText = document.getElementById("generatedLink");
copyText.select();
copyText.setSelectionRange(0, 99999); /* For mobile devices */
navigator.clipboard.writeText(copyText.value);
console.log("Copied to clipboard");
document.getElementById("clipboardMessage").style.display = "inline";
setTimeout(() => {document.getElementById("clipboardMessage").style.display = "none"}, 1000);
}