-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathelements.js
111 lines (99 loc) · 4.28 KB
/
elements.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
export const root = document.getElementById('root');
export const body = document.getElementById('body');
export const style = document.getElementById('style');
export const APP = window.location.hostname == '';
export const VERSION = '24.12.23';
export const menuButtons = {
search: document.getElementById('searchButton'),
urlDownloader: document.getElementById('urlDownloaderButton'),
modListDoc: document.getElementById('modListDocButton')
}
export let modOutput, modInput, search, modListDoc;
export function searchElements(){
search = {
versionInput: document.getElementById('searchVersionInput'),
limitInput: document.getElementById('searchLimitInput'),
loaderDropdown: document.getElementById('searchLoaderDropdown'),
modrinthButton: document.getElementById('searchModrinthButton'),
curseForgeButton: document.getElementById('searchCurseForgeButton'),
textArea: document.getElementById('searchTextArea'),
searchButton: document.getElementById('searchSearchButton'),
output: document.getElementById('searchOutput'),
sendOutput: document.getElementById('searchSendOutput'),
// selectAllOutput: document.getElementById('searchSelectAllOutput'),
outputTitle: document.getElementById('searchOutputTitle'),
progressDiv: document.getElementById('searchProgressDiv'),
progressBar: document.getElementById('searchProgressBar'),
outputText: document.getElementById('searchOutputText'),
optionsText: document.getElementById('searchOptionsText'),
cat: document.getElementById('cat')
};
}
export function modListDocElements(){
modListDoc = {
downloadHTML: document.getElementById('modListDocDownloadHTML')
}
}
export function urlDownloaderElements(){
modOutput = {
div: document.getElementById('modOutput'),
title: document.getElementById('modOutputTitle'),
text: document.getElementById('modOutputText'),
copyButton: document.getElementById('modOutputCopy'),
downloadButton: document.getElementById('modOutputDownload'),
downloadHTML: document.getElementById('modOutputDocDownloadHTML'),
progressBar: document.getElementById('modOutputProgressBar'),
progressDiv: document.getElementById('modOutputProgressDiv')
}
modInput = {
urlsText: document.getElementById('urlsText'),
textArea: document.getElementById('modInputTextArea'),
loadButton: document.getElementById('modInputLoadButton'),
verisonArea: document.getElementById('modInputVerisonArea'),
loaderDropdown: document.getElementById('modInputLoaderDropdown'),
AddDependsButton: document.getElementById('modInputAddDependsButton')
}
}
export const modal = {
modal: new bootstrap.Modal(document.getElementById('menu-modal'), {backdrop: 'static'}),
modalTitle: document.getElementById('menu-modal-title'),
modalBody: document.getElementById('menu-modal-body'),
modalFooter: document.getElementById('menu-modal-footer'),
modalCloseButton: document.getElementById('modal-close-button'),
modalSize: document.getElementById('modal-size')
}
export const settings = {
modal: new bootstrap.Modal(document.getElementById('settingModal'), {backdrop: 'static'}),
downloadSwitch: document.getElementById('copyDownloadSwitch'),
errorSwitch: document.getElementById('copyErrorSwitch'),
topErrorSwitch: document.getElementById('topErrorSwitch'),
zipDownloadSwitch: document.getElementById('zipDownloadSwitch'),
removeDupesSwitch: document.getElementById('removeDupesSwitch'),
updateLink: document.getElementById('settingsUpdateLink'),
footer: document.getElementById('settingsModalfooter'),
verison: document.getElementById('settingsVerison')
}
export const TEXTBACKGROUNDCOLOR = {
NONE: '-',
SUCCESS: 'text-bg-success',
PRIMARY: 'text-bg-primary',
DARK: 'text-bg-dark',
DANGER: 'text-bg-danger',
WARNING: 'text-bg-warning'
}
export const TEXTCOLOR = {
NONE: '-',
SUCCESS: 'text-success',
PRIMARY: 'text-primary',
DARK: 'text-dark',
DANGER: 'text-danger',
WARNING: 'text-warning'
}
export const COLOR = {
NONE: '-',
SUCCESS: 'success',
PRIMARY: 'primary',
DARK: 'dark',
DANGER: 'danger',
WARNING: 'warning'
}