Add site-vars.js containing site-wide javascript variables, and add the current page from the URL to it

This commit is contained in:
Kevin MacMartin 2015-09-30 00:17:09 -04:00
parent 61ca7022fb
commit 7c47ebe8f4
2 changed files with 5 additions and 0 deletions

View file

@ -12,6 +12,7 @@ elixir.config.autoprefix = { remove: false, cascade: false, browsers: ['last 2 v
// javascript files in resources/assets/js/
var jsLocal = [
'site-vars.js',
'app.js'
];

View file

@ -0,0 +1,4 @@
var SiteVars = {
page: location.href.replace(/https*:\/\/[^\/]*\//, '').replace(/(#|\?).*/, '')
};