script.js and script_404.js don't have "separation of concern" basically, they overflow each other, and functions from one check for elements that are not rendered on the screen from the other.
To patch it up I added verifications for the presence of respective DOM elements before function execution.
script.js and script_404.js don't have "separation of concern" basically, they overflow each other, and functions from one check for elements that are not rendered on the screen from the other.
To patch it up I added verifications for the presence of respective DOM elements before function execution.
Perhaps someone has a more elegant solution, idk.