-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
73 lines (59 loc) · 2.12 KB
/
Copy pathscript.js
File metadata and controls
73 lines (59 loc) · 2.12 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
const URLs = {
tab1: 'https://github.com/itzAntonis2012/evalpatch/releases/latest',
subtab1: 'https://github.com/ItzAntonis2012/modernizepspgames/releases/tag/v1-SteamArtwork',
subsubtab1: 'https://github.com/ItzAntonis2012/modernizepspgames/releases/tag/v1-LCS',
subsubtab2: 'https://github.com/ItzAntonis2012/modernizepspgames/releases/tag/v1-VCS',
subsubtab3: 'https://github.com/ItzAntonis2012/modernizepspgames/releases/tag/v1-CTW'
};
document.addEventListener('DOMContentLoaded', () => {
const mainTabs = document.getElementById('main-tabs');
const submenu1 = document.getElementById('submenu1');
const submenu2 = document.getElementById('submenu2');
const tab1 = document.getElementById('tab1');
const tab2 = document.getElementById('tab2');
const subtab1 = document.getElementById('subtab1');
const subtab2 = document.getElementById('subtab2');
const subsubtab1 = document.getElementById('subsubtab1');
const subsubtab2 = document.getElementById('subsubtab2');
const back1 = document.getElementById('back1');
const back2 = document.getElementById('back2');
// Tab 1 - redirect
tab1.onclick = () => {
window.location.href = URLs.tab1;
};
// Tab 2 - show submenu1, hide main tabs
tab2.onclick = () => {
mainTabs.classList.add('hidden');
submenu1.classList.remove('hidden');
};
// Subtab 1 - redirect
subtab1.onclick = () => {
window.location.href = URLs.subtab1;
};
// Subtab 2 - show submenu2, hide submenu1
subtab2.onclick = () => {
submenu1.classList.add('hidden');
submenu2.classList.remove('hidden');
};
// Subsubtab 1 - redirect
subsubtab1.onclick = () => {
window.location.href = URLs.subsubtab1;
};
// Subsubtab 2 - redirect
subsubtab2.onclick = () => {
window.location.href = URLs.subsubtab2;
};
// Subsubtab 3 - redirect
subsubtab3.onclick = () => {
window.location.href = URLs.subsubtab3;
};
// Back buttons
back1.onclick = () => {
submenu1.classList.add('hidden');
mainTabs.classList.remove('hidden');
};
back2.onclick = () => {
submenu2.classList.add('hidden');
submenu1.classList.remove('hidden');
};
});