I have this Javscript fade effect when opening the page, for example admin.php.
<body>
<script>
document.body.className = 'fade';
</script>
...html code...
<script>
document.addEventListener("DOMContentLoaded", function(e) {
document.body.className = '';
});
</script>
</body>
The problem is I can't figure it out how to run this script only when comming from login.php page.
For clarification, it's an effect when opening page it's white and then in about 1sec the page becomes visible, creating fade effect.