-
Notifications
You must be signed in to change notification settings - Fork 33
/
Copy pathapp.js
39 lines (32 loc) · 1.26 KB
/
app.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
function checkClient() {
const clientSelect = document.getElementById('clientSelect');
const resolutionSelect = document.getElementById('resolutionSelect');
if (clientSelect.value === 'Vanilla') {
resolutionSelect.classList.add('disabled-select');
resolutionSelect.classList.remove('enabled-select');
resolutionSelect.disabled = true;
} else {
resolutionSelect.classList.add('enabled-select');
resolutionSelect.classList.remove('disabled-select');
resolutionSelect.disabled = false;
}
}
function launchClient() {
const clientSelect = document.getElementById('clientSelect');
const resolutionSelect = document.getElementById('resolutionSelect');
const selectedClient = clientSelect.value;
const selectedResolution = resolutionSelect.value;
if (selectedClient === 'default') {
alert("Please select a client!");
return;
}
let pageUrl;
if (selectedClient === 'Vanilla') {
pageUrl = `Vanilla.html`;
} else if(selectedResolution === '1.3'){
window.open("https://barneycompiler.github.io/AstraClientEagler/javascript/", '_blank');
}else{
pageUrl = `${selectedClient}${selectedResolution}.html`;
}
window.open(pageUrl, '_blank');
}