Not sure if this is possible or even if I should do it, but I think it\'s quite interesting.
I have a javascript file which I\'m referencing in a flat HTML page. I\
I don't think that passing in variables via the src
attribute is possible out of the box without some extra coding on your part (there is an article here if you are interested!). You could do the following though, which should provide the same functionality as you are looking for:
Define your "config" variables in a single script block on your HTML page:
Reference your external JS file in a second script block:
Add this code to your external JS file to reference the "local" variable in your HTML:
var conf1 = window.config1;
if (conf1) {
// Do stuff
}