diff --git a/index.html b/index.html index 84e6b37d..00248914 100644 --- a/index.html +++ b/index.html @@ -63,6 +63,7 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
Do you want to force the browser to use HTTPS from now on?
'+ + 'WARNING: This will make all of your local files unavailable, so you should "Download All Changes" first for each platform where you have done work.
'+ + 'You can go back to HTTP by setting the "'+useHTTPSCookieName+'" cookie to 0.
', (ok) => { + if (ok) { + setHTTPSCookie(1); + redirectToHTTPS(); + } + }); +} + function redirectToHTTPS() { if (window.location.protocol == 'http:' && window.location.host == '8bitworkshop.com') { if (shouldRedirectHTTPS()) { window.location.replace(window.location.href.replace(/^http:/, 'https:')); } else { - $("#http_warning").show(); // TODO + $("#item_switch_https").click(_switchToHTTPS).show(); } } }