Skip to content

Commit 0c79bd3

Browse files
committed
web: Make the SSL warning an init function
1 parent 69a5a4b commit 0c79bd3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

web/control.js

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
//
66
INIT_FUNCTIONS = [
77
load_config,
8+
init_ssl_warning,
89
init_rellinks,
910
init_soundfiles,
1011
init_audio,

web/util.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,10 @@ async function load_config () {
4040

4141

4242
// If this is SSL, show the warning
43-
if (window.location.protocol === 'https:') {
44-
forEach('.ssl-warning', x => {x.style.display = 'block'});
43+
async function init_ssl_warning () {
44+
if (window.location.protocol === 'https:') {
45+
forEach('.ssl-warning', x => {x.style.display = 'block'});
46+
}
4547
}
4648

4749

0 commit comments

Comments
 (0)