Upload files to "/"
This commit is contained in:
23
backg.js
Normal file
23
backg.js
Normal file
@@ -0,0 +1,23 @@
|
||||
function addFadeOut() {
|
||||
document.body.classList.add('fade-out');
|
||||
}
|
||||
|
||||
|
||||
function removeFadeOut() {
|
||||
document.body.classList.remove('fade-out');
|
||||
}
|
||||
|
||||
|
||||
window.addEventListener('beforeunload', addFadeOut);
|
||||
|
||||
|
||||
window.addEventListener('load', removeFadeOut);
|
||||
|
||||
|
||||
window.addEventListener('popstate', () => {
|
||||
|
||||
addFadeOut();
|
||||
setTimeout(() => {
|
||||
removeFadeOut();
|
||||
}, 500);
|
||||
});
|
||||
Reference in New Issue
Block a user