-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
636 lines (579 loc) · 31.2 KB
/
index.html
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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Gluta</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<script>
const setAllLocalStorage = (object) => {
const keys = Object.keys(object);
console.table(object)
// iterate over array
keys.forEach((key, index) => {
localStorage.setItem(key, object[key]);
});
}
// main initialization and global variables
let obj;
let iterations = 0;
const path = require('path');
const {
ipcRenderer,
shell
} = require('electron');
const {version} = require('./package.json')
let isOr = false;
let toggleSave = localStorage.getItem('selected')==='true'?true:false
function countUpFromTime(countFrom) {
// count up timer in the Rich Presence application which resets every 24 hours as per official discord RPC.
countFrom = new Date(countFrom).getTime();
var now = new Date(),
countFrom = new Date(countFrom),
timeDifference = (now - countFrom);
var secondsInADay = 60 * 60 * 1000 * 24,
secondsInAHour = 60 * 60 * 1000;
hours = Math.floor((timeDifference % (secondsInADay)) / (secondsInAHour) * 1);
mins = Math.floor(((timeDifference % (secondsInADay)) % (secondsInAHour)) / (60 * 1000) * 1);
secs = Math.floor((((timeDifference % (secondsInADay)) % (secondsInAHour)) % (60 * 1000)) / 1000 * 1);
let elem = document.getElementById('elapsed');
if (hours < 10)
hours = "0" + hours;
if (mins < 10)
mins = "0" + mins;
if (secs < 10)
secs = "0" + secs;
if (hours < 1)
hours = ""
elem.innerText = `${hours}${hours==""?"":":"}${mins}:${secs} Elapsed`;
clearTimeout(countUpFromTime.interval);
countUpFromTime.interval = setTimeout(function() {
countUpFromTime(countFrom);
}, 1000);
}
function DisableFunc() {
ipcRenderer.send('disableRpcCallback')
}
function UploadBanner() {
let str = document.getElementById('bannerBtn').value
let banner = document.getElementById('bg')
console.log(str, banner)
if (!str.startsWith('https://')) {
let userID = localStorage.getItem('userID')
try {
let splitted = str.split('.', 1);
} catch {
return console.log("Invalid ID")
}
if (!userID) {
return console.log('Either set the RPC first, or use a full URL format.')
}
let final = `https://cdn.discordapp.com/banners/${userID}/${splitted}.${str.startsWith('a_')?"gif":'png'}?size=64`
banner.style.backgroundImage = `url(${final})`
localStorage.setItem('bannerURL', final)
} else {
let final = str
banner.style.backgroundImage = `url(${final})`
localStorage.setItem('bannerURL', final)
}
}
function RPCfunc() {
// main initalization of rich presence information set as an object
const obj = {
clientVar: document.getElementById('client').value,
stateVar: document.getElementById("state").value,
detailsVar: document.getElementById("details").value,
largeTxtVar: document.getElementById("largeImgTxt").value,
largeIdtVar: document.getElementById("largeImgIdt").value,
smallTxtVar: document.getElementById("smallImgTxt").value,
smallIdtVar: document.getElementById("smallImgIdt").value,
btnUrl1Var: document.getElementById("btnUrl1").value,
btnUrl2Var: document.getElementById("btnUrl2").value,
btnTxt1VarLol: document.getElementById("btnTxt1").value,
btnTxt2VarLol: document.getElementById("btnTxt2").value,
gameName: document.getElementById('name').value,
elapsed: isOr
};
const {
clientVar,
stateVar,
detailsVar,
largeIdtVar,
largeTxtVar,
smallIdtVar,
smallTxtVar,
btnTxt1VarLol,
btnTxt2VarLol,
btnUrl1Var,
btnUrl2Var,
gameName
} = obj;
console.log(
'%c— %cSetting Rich Presence %c—',
'color: red; font-weight:bold;',
`color: ${window.matchMedia("(prefers-color-scheme: dark)").matches?'white':'black'}; font-weight:bold;`,
'color: red; font-weight:bold;'
)
// send data to main.js
ipcRenderer.send('asynchronous-message', obj);
// receive message from main.js
let elem1 = document.getElementById('save1')
let elem2 = document.getElementById('save2')
if (elem1.dataset.selected=='true') {
const localObj = {
'clientVar': clientVar,
'stateVar': stateVar,
'detailsVar': detailsVar,
'largeTxtVar': largeTxtVar,
'largeIdtVar': largeIdtVar,
'smallTxtVar': smallTxtVar,
'smallIdtVar': smallIdtVar,
'btnUrl1Var': btnUrl1Var,
'btnUrl2Var': btnUrl2Var,
'btnTxt1Var': btnTxt1VarLol,
'btnTxt2Var': btnTxt2VarLol,
'gameName': gameName
};
setAllLocalStorage(localObj)
elem1.innerText = gameName
} else {
const localObj = {
'clientVar2': clientVar,
'stateVar2': stateVar,
'detailsVar2': detailsVar,
'largeTxtVar2': largeTxtVar,
'largeIdtVar2': largeIdtVar,
'smallTxtVar2': smallTxtVar,
'smallIdtVar2': smallIdtVar,
'btnUrl1Var2': btnUrl1Var,
'btnUrl2Var2': btnUrl2Var,
'btnTxt1Var2': btnTxt1VarLol,
'btnTxt2Var2': btnTxt2VarLol,
'gameName2': gameName
};
setAllLocalStorage(localObj)
elem2.innerText = gameName
}
ipcRenderer.once('asynchronous-reply', (event, arg) => {
// collects variables of all selectors and arguments
let profilePic = document.getElementById('pfp');
let user1 = document.getElementById('nickname');
let user2 = document.getElementById('username');
let bgImg = document.getElementById('bg');
let ColorThief = require('colorthief');
let {
avatarIcon,
userID,
userDisc
} = arg;
localStorage.setItem('userID', userID)
let largeImgIcn = document.getElementById('paimon');
let smallImgIcn = document.getElementById('small');
if (iterations < 1) {
bgImg.style.backgroundColor = "transparent";
iterations++;
}
// checks if the old avatar is the same as the new one; if it isnt, it sets the banner again.
profilePic.src = avatarIcon;
localStorage.setItem('pfpURL', avatarIcon)
profilePic.onload = () => {
ColorThief.getColor(avatarIcon)
.then(color => {
let banner = localStorage.getItem('bannerURL')
if (!banner) {
let bannerURL = "rgb(" + color + ")";
bgImg.style.backgroundColor = bannerURL
localStorage.setItem('bannerURL', bannerURL)
}
})
.catch(err => {
console.log(err)
})
};
user1.innerText = userID;
user2.innerText = userID + "#" + userDisc;
// fetches the id of the images used in the rich presence and sets them to the preview of it
const fetchData = require('node-fetch');
let URL = `https://discordapp.com/api/oauth2/applications/${clientVar}/assets`;
fetchData(URL).then(async (response) => {
let data = await response.json();
let largeImgIdentifier = document.getElementById("largeImgIdt").value
let largeImgId;
let smallImgId;
if (data[0].id && data[1].id && data[0].name) {
if (data[0].name == largeImgIdentifier) {
largeImgId = data[0].id;
smallImgId = data[1].id;
} else {
largeImgId = data[1].id;
smallImgId = data[0].id;
}
largeImgIcn.src = `https://cdn.discordapp.com/app-assets/${clientVar}/${largeImgId}.png`
smallImgIcn.src = `https://cdn.discordapp.com/app-assets/${clientVar}/${smallImgId}.png`
} else {
alert(new Error('There was an issue with the Client ID Images! They will be set to default for now.'))
}
});
})
}
window.addEventListener("load", function() {
let loadTxt = document.getElementById('loadingTxt')
let loadBar = document.getElementById('loading-bar')
let loadDiv = document.getElementById('loading')
countUpFromTime(Date.now());
loadTxt.innerText = "Loading... (15%)"
loadBar.style.width = '12vw'
loadBar.style.opacity = "1"
toggleSaves()
loadTxt.innerText = "Loading... (55%)"
loadBar.style.width = '44vw'
setTimeout(() => {
toggleSaves()
loadTxt.innerText = "Loading... (87%)"
loadBar.style.width = '69vw'
if (sessionStorage.getItem('version_gotten') != 'achieved') {
const fetchData = require('node-fetch');
let URL = `https://api.github.com/repos/acquitelol/gluta/releases/latest`;
sessionStorage.setItem('version_gotten', 'achieved')
fetchData(URL).then(async (response) => {
let data = await response.json();
let latestVersion;
if (data['tag_name']) {
latestVersion = data["tag_name"]
} else {
return
}
let currentVersion = version
console.log(latestVersion, currentVersion)
localStorage.setItem('latest', latestVersion)
if (latestVersion != currentVersion) {
let elem = document.getElementById('newUpdate')
let updateDiv = document.getElementById("sub")
let updateBadge = document.getElementById('badge2')
let updateTooltip = document.getElementById('updateTooltipText')
elem.setAttribute('data-version', latestVersion)
updateTooltip.innerText = `Update to ${latestVersion}!`;
updateDiv.innerText = `Click here to update to version ${latestVersion}!`
elem.style.transform = 'translateX(5vw) translateY(2vh) scale(1)'
elem.style.opacity = '1'
setTimeout(() => {
elem.style.transition = 'all 1000ms ease'
elem.style.opacity = '0'
elem.style.pointerEvents = "none"
updateBadge.style.transform = "translateX(12.25em) translateY(4em) scale(2)";
updateBadge.style.opacity = '1'
}, 3000)
}
})
} else {
let latestVersion;
if (localStorage.getItem('latest')) {
latestVersion = localStorage.getItem('latest')
} else {
latestVersion = version
}
let currentVersion = version
if (latestVersion != currentVersion) {
let elem = document.getElementById('newUpdate')
let updateDiv = document.getElementById("sub")
let updateBadge = document.getElementById('badge2')
let updateTooltip = document.getElementById('updateTooltipText')
elem.setAttribute('data-version', latestVersion)
updateTooltip.innerText = `Update to v${latestVersion}!`;
updateDiv.innerText = `Click here to update to v${latestVersion}!`
elem.style.transform = 'translateX(5vw) translateY(2vh) scale(1)'
elem.style.opacity = '1'
setTimeout(() => {
elem.style.transition = 'all 1000ms ease'
elem.style.opacity = '0'
elem.style.pointerEvents = "none"
updateBadge.style.transform = "translateX(12.25em) translateY(4em) scale(2)";
updateBadge.style.opacity = '1'
}, 3000)
}
}
document.getElementById('badgeTooltipText').innerText = `v${version} @ 26.06.22`
let banner = localStorage.getItem('bannerURL')
let pfp = localStorage.getItem('pfpURL')
if (banner) {
let bg = document.getElementById('bg')
bg.style.backgroundImage = banner.startsWith('https://')?`url(${banner})`:banner;
}
if (pfp) {
let pfpIcon = document.getElementById('pfp')
pfpIcon.src = pfp
}
loadTxt.innerText = "Loading... (100%)"
loadBar.style.width = '80vw'
setTimeout(() => {
loadDiv.style.filter = "opacity(0)"
setTimeout(() => {
loadDiv.style.display='none'
}, 400)
}, 100)
}, 500)
})
const linethrough = () => {
let item = document.getElementById('elapsed');
const darkThemeMq = window.matchMedia("(prefers-color-scheme: dark)")
if (!isOr) {
item.style.textDecorationLine = 'line-through';
item.style.color = '#b0b0b0'
isOr = true;
RPCfunc();
console.log(isOr)
} else if (isOr) {
item.style.textDecorationLine = 'none';
item.style.color = darkThemeMq.matches?'#FFFFFF':'rgba(0,0,0,0.8)'
isOr = false;
RPCfunc();
console.log(isOr)
}
};
const toggleSaves = () => {
let doc = document
let save1 = doc.getElementById('save1')
let save2 = doc.getElementById('save2')
if (toggleSave) {
save2.setAttribute('data-selected', 'false')
save1.setAttribute('data-selected', 'true')
let gameId = localStorage.getItem('gameName');
if (!gameId) {
gameId = "Genshin Impact"
}
document.getElementById('name').value = gameId;
document.getElementById("client").value = localStorage.getItem('clientVar');
document.getElementById("state").value = localStorage.getItem('stateVar');
document.getElementById("details").value = localStorage.getItem('detailsVar');
document.getElementById("largeImgTxt").value = localStorage.getItem('largeTxtVar');
document.getElementById("largeImgIdt").value = localStorage.getItem('largeIdtVar');
document.getElementById("smallImgTxt").value = localStorage.getItem('smallTxtVar');
document.getElementById("smallImgIdt").value = localStorage.getItem('smallIdtVar');
document.getElementById("btnUrl1").value = localStorage.getItem('btnUrl1Var');
document.getElementById("btnUrl2").value = localStorage.getItem('btnUrl2Var');
document.getElementById("btnTxt1").value = localStorage.getItem('btnTxt1Var');
document.getElementById("btnTxt2").value = localStorage.getItem('btnTxt2Var');
localStorage.setItem('selected', false)
RPCfunc()
toggleSave = localStorage.getItem('selected')=='false'?false:true
} else if (!toggleSave) {
save1.setAttribute('data-selected', 'false')
save2.setAttribute('data-selected', 'true')
let gameId = localStorage.getItem('gameName2');
if (!gameId) {
gameId = "Genshin Impact"
}
document.getElementById('name').value = gameId;
document.getElementById("client").value = localStorage.getItem('clientVar2');
document.getElementById("state").value = localStorage.getItem('stateVar2');
document.getElementById("details").value = localStorage.getItem('detailsVar2');
document.getElementById("largeImgTxt").value = localStorage.getItem('largeTxtVar2');
document.getElementById("largeImgIdt").value = localStorage.getItem('largeIdtVar2');
document.getElementById("smallImgTxt").value = localStorage.getItem('smallTxtVar2');
document.getElementById("smallImgIdt").value = localStorage.getItem('smallIdtVar2');
document.getElementById("btnUrl1").value = localStorage.getItem('btnUrl1Var2');
document.getElementById("btnUrl2").value = localStorage.getItem('btnUrl2Var2');
document.getElementById("btnTxt1").value = localStorage.getItem('btnTxt1Var2');
document.getElementById("btnTxt2").value = localStorage.getItem('btnTxt2Var2');
localStorage.setItem('selected', true)
RPCfunc()
toggleSave = localStorage.getItem('selected')=='true'?true:false
}
}
ipcRenderer.on('enableSaves', (arg, event) => {
let url1div = document.getElementById('savesMenu');
url1div.style.transition = "all 500ms ease";
url1div.style.filter = "opacity(1)";
url1div.style.zIndex = "1"
})
ipcRenderer.on('setCustomBanner', (arg, event) => {
let url1div = document.getElementById('bannerMenu');
url1div.style.transition = "all 500ms ease";
url1div.style.filter = "opacity(1)";
url1div.style.zIndex = "1"
})
ipcRenderer.on('clearCacheResponse', (event, arg) => {
const clearObj = {
'clientVar': "",
'stateVar': "",
'detailsVar': "",
'largeTxtVar': "",
'largeIdtVar': "",
'smallTxtVar': "",
'smallIdtVar': "",
'btnUrl1Var': "",
'btnUrl2Var': "",
'btnTxt1Var': "",
'btnTxt2Var': "",
'gameName': "",
'clientVar2': "",
'stateVar2': "",
'detailsVar2': "",
'largeTxtVar2': "",
'largeIdtVar2': "",
'smallTxtVar2': "",
'smallIdtVar2': "",
'btnUrl1Var2': "",
'btnUrl2Var2': "",
'btnTxt1Var2': "",
'btnTxt2Var2': "",
'gameName2': "",
'version_gotten': "",
'latest': "",
'selected': 'false'
};
setAllLocalStorage(clearObj)
})
ipcRenderer.on('errMsgDDt', (event, arg) => {
console.log(arg);
})
ipcRenderer.on('toggle', (event, arg) => {
if (arg) {
RPCfunc();
} else {
DisableFunc();
}
})
ipcRenderer.on('errMsgDDtAlert', (event, arg) => {
alert(arg)
})
const devPortalFunc = () => {
shell.openExternal("https://discord.com/developers/applications");
}
const latestRelease = () => {
let version = document.getElementById('newUpdate').getAttribute('data-version')
shell.openExternal(`https://github.com/acquitelol/gluta/releases/download/${version}/Gluta-${version}.dmg`);
}
const url1func = () => {
let url1div = document.getElementById('Url1');
url1div.style.transition = "all 500ms ease";
url1div.style.filter = "opacity(1)";
url1div.style.zIndex = "1"
}
const url2func = () => {
let url1div = document.getElementById('Url2');
url1div.style.transition = "all 500ms ease";
url1div.style.filter = "opacity(1)";
url1div.style.zIndex = "1"
}
const paimonClick = () => {
let url1div = document.getElementById('paimonMenu');
url1div.style.transition = "all 500ms ease";
url1div.style.filter = "opacity(1)";
url1div.style.zIndex = "1"
}
const smallClick = () => {
let url1div = document.getElementById('smallMenu');
url1div.style.transition = "all 500ms ease";
url1div.style.filter = "opacity(1)";
url1div.style.zIndex = "1"
}
const closeFunc = (arg) => {
switch(arg) {
case 1: {
let closeBtn = document.getElementById('closeBtn1');
closeBtn.parentElement.style.filter = "opacity(0)";
closeBtn.parentElement.style.zIndex = "-1";
} case 2: {
let closeBtn = document.getElementById('closeBtn2');
closeBtn.parentElement.style.filter = "opacity(0)";
closeBtn.parentElement.style.zIndex = "-1";
} case 3: {
let closeBtn = document.getElementById('closeBtn3');
closeBtn.parentElement.style.filter = "opacity(0)";
closeBtn.parentElement.style.zIndex = "-1";
} case 4: {
let closeBtn = document.getElementById('closeBtn4');
closeBtn.parentElement.style.filter = "opacity(0)";
closeBtn.parentElement.style.zIndex = "-1";
} case 5: {
let closeBtn = document.getElementById('closeBtn5');
closeBtn.parentElement.style.filter = "opacity(0)";
closeBtn.parentElement.style.zIndex = "-1";
} case 6: {
let closeBtn = document.getElementById('closeBtn6');
closeBtn.parentElement.style.filter = "opacity(0)";
closeBtn.parentElement.style.zIndex = "-1";
}
}
}
</script>
<!-- main HTML elements to recreate the rich presence preview-->
<div id='bg'></div>
<img src="./assets/Scrolling-Lines-Pink.gif" alt="Discord PFP" width="60" height="60", class='pfp' id='pfp'>
<input type="number" class="client_id stuff items" placeholder="Input Client ID" id="client" value='' onclick="this.select()" onchange="RPCfunc()">
<input type="text" class="details stuff things items" placeholder="Details" id="details" value='' onclick="this.select()" onchange="RPCfunc()">
<input type="text" class="state stuff things items" placeholder="State" id="state" value='' onclick="this.select()" onchange="RPCfunc()">
<button type="button" class="elapsed thingy items" id="elapsed" readonly='true' unselectable="on" contenteditable="false" onselectstart="select=false" onclick='linethrough()'>00:01 Elapsed</button>
<input type="text" class="btnTxt1 stuff items buttons" placeholder="Button Text 1" id="btnTxt1" value='Button Text 1' onclick="this.select()" onchange="RPCfunc()">
<input type="text" class="btnTxt2 stuff items buttons" placeholder="Button Text 2" id="btnTxt2" value='Button Text 2' onclick="this.select()" onchange="RPCfunc()">
<h3 class='nickname' id='nickname'> Testing Only</h3>
<h4 class='username' id='username'> Test Account#0001</h4>
<div class='images things' id='play'>Playing a game</div>
<input type="text" class='genshin things' id='name' value='Genshin Impact' placeholder="Game Name" onclick="this.select()" onchange="RPCfunc()"></input>
<img src='https://cdn.discordapp.com/app-assets/929391097824821318/929483644731551754.png' alt='paimon' width="56" height="56" class='paimon things' id='paimon' onclick="paimonClick()">
<img src='assets/yae.png' alt='small' width="16" height="16" class='yae things' id='small' onclick='smallClick()'>
<img src="./assets/circle.png" alt="circle" width="11" height="11", class='circle'>
<img src="./assets/devportal.png" alt="discord-dev-portal" width="10" height="10", class='devportal' onclick="devPortalFunc()">
<img src="./assets/badge-dev.png" alt="developer-badge" width="10" height="10", class='badge' id='badge'>
<div id="badgeTooltipWrapper">
<div id="badgeTooltipText">v9.99.9 @ undefined</div>
<div class='triangle'></div>
</div>
<img src="./assets/nitro.png" alt="developer-badge" width="10" height="10", class='nitro' id='badge2' onclick="latestRelease()">
<div id="updateTooltipWrapper">
<div id="updateTooltipText">Update to {version}</div>
<div class='triangle'></div>
</div>
<img src="./assets/divider.png" alt="divider" width="230" height="1", class='divider'>
<img src='./assets/cog-icon.png' alt='cog' width='15' height="15" class="cog things" id='cog1' onclick="url1func()">
<img src='./assets/cog-icon.png' alt='cog' width='15' height="15" class="cog things" id='cog2' onclick="url2func()">
<div id='Url1'>
<div class='URL'>Input a URL:</div>
<input class='btnUrl1 stuff items btnUrls' placeholder="Button Url 1" id='btnUrl1' value="" onclick="this.select()" onchange="RPCfunc()"></input>
<button type="button" class="closeBtn" onclick="closeFunc(1)" id="closeBtn1" data-type="closeBtn">Close Menu</button>
</div>
<div id='Url2'>
<div class='URL'>Input a URL:</div>
<input class='btnUrl2 stuff items btnUrls' placeholder="Button Url 2" id='btnUrl2' value="" onclick="this.select()" onchange="RPCfunc()"></input>
<button type="button" class="closeBtn" onclick="closeFunc(2)" id="closeBtn2" data-type="closeBtn">Close Menu</button>
</div>
<div id='bannerMenu'>
<div class='bannerTxt'>Input a Custom Banner URL:</div>
<input class='btnUrl2 stuff items btnUrls' placeholder="Banner URL" id='bannerBtn' value="" onclick="this.select()" onchange="UploadBanner()"></input>
<button type="button" class="closeBtn" onclick="closeFunc(6)" id="closeBtn6" data-type="closeBtn">Close Menu</button>
</div>
<div id='paimonMenu'>
<div class='paimonTxt URL'>Edit Large Image:</div>
<input class='largeImgTxt stuff items btnUrls' placeholder="Large Image Text" id='largeImgTxt' value="" onclick="this.select()" onchange="RPCfunc()"></input>
<input class='largeImgIdt stuff items btnUrls' placeholder="Large Image Identifier" id='largeImgIdt' value="" onclick="this.select()" onchange="RPCfunc()"></input>
<button type="button" class="closeBtn" onclick="closeFunc(3)" id="closeBtn3" data-type="closeBtn">Close Menu</button>
</div>
<div id='smallMenu'>
<div class='smallTxt URL'>Edit Small Image:</div>
<input class='smallImgTxt stuff items btnUrls' placeholder="Small Image Text" id='smallImgTxt' value="" onclick="this.select()" onchange="RPCfunc()"></input>
<input class='smallImgIdt stuff items btnUrls' placeholder="Small Image Identifier" id='smallImgIdt' value="" onclick="this.select()" onchange="RPCfunc()"></input>
<button type="button" class="closeBtn" onclick="closeFunc(4)" id="closeBtn4" data-type="closeBtn">Close Menu</button>
</div>
<div id='savesMenu'>
<div class='savesTxt URL'>Manage Saves:</div>
<button class='save1 stuff items btnUrls' id='save1' data-selected="true">Save 1</button>
<button class='save2 stuff items btnUrls' id='save2' data-selected="false">Save 2</button>
<button type="button" class="closeBtn" onclick="toggleSaves()" id="toggleSaves">Toggle Saves</button>
<button type="button" class="closeBtn" onclick="closeFunc(5)" id="closeBtn5">Close Menu</button>
</div>
<div id='loading'>
<div class='URL' id="loadingTxt">Loading... (0%)</div>
<button class='stuff items btnUrls' id='empty-bar'></button>
<button class='stuff items btnUrls' id='loading-bar'></button>
</div>
<div id='newUpdate' onclick="latestRelease()" data-version='undefined (yet)'>
<div class="updateTxt heading" id="heading">A new <strong>Update</strong> is available! <span id="sparkle">✨</span></div>
<div class="update updateTxt" id="sub"><strong>Click here</strong> to update to {version}!</div>
<img src="./assets/code.png" alt="download-icon" width="50" height="50", class='codeIcon'>
<div id="click"></div>
</div>
</html>