Rename themes -> flavours ? ?
This commit is contained in:
7
app/javascript/flavours/glitch/util/ready.js
Normal file
7
app/javascript/flavours/glitch/util/ready.js
Normal file
@@ -0,0 +1,7 @@
|
||||
export default function ready(loaded) {
|
||||
if (['interactive', 'complete'].includes(document.readyState)) {
|
||||
loaded();
|
||||
} else {
|
||||
document.addEventListener('DOMContentLoaded', loaded);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user