mirror of
https://github.com/thelounge/thelounge
synced 2024-11-26 22:10:22 +00:00
21 lines
537 B
JavaScript
21 lines
537 B
JavaScript
/* eslint strict: 0 */
|
|
"use strict";
|
|
|
|
/*
|
|
* This is a separate file for two reasons:
|
|
* 1. CSP policy does not allow inline javascript
|
|
* 2. It has to be a small javascript executed before all other scripts,
|
|
* so that the timeout can be triggered while slow JS is loading
|
|
*/
|
|
|
|
setTimeout(function() {
|
|
var element = document.getElementById("loading-slow");
|
|
|
|
if (element) {
|
|
element.style.display = "block";
|
|
}
|
|
}, 5000);
|
|
|
|
document.getElementById("loading-slow-reload").addEventListener("click", function() {
|
|
location.reload();
|
|
});
|