I am using one JavaScript file for multiple HTML files, but I don't want a certain part of the JavaScript file to be used for one of the HTML files. How do I check which HTML file is being used?
3 Answers
One easy way is to pass parameters to the javascript. Look at this answer
you can also use globals, but parameters are cleaner and safer.