diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-08-15 11:43:21 +0100 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-08-16 18:38:23 +0100 |
commit | bef9203e2380df25372e3f8aa7c763a72ec4aa5a (patch) | |
tree | 8c57cf70250ca279d43bf4b1cf77731a151c9a28 /web | |
parent | 3425a7ba037612141f75321d3d0b226e4ca0ed1e (diff) |
Move most JavaScript to end, inline the remaining.
Diffstat (limited to 'web')
-rw-r--r-- | web/cobrands/fixmystreet/front.js | 4 | ||||
-rw-r--r-- | web/cobrands/fixmystreet/header.js | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/web/cobrands/fixmystreet/front.js b/web/cobrands/fixmystreet/front.js index 8fc5db214..a5e3bac98 100644 --- a/web/cobrands/fixmystreet/front.js +++ b/web/cobrands/fixmystreet/front.js @@ -3,10 +3,10 @@ yepnope.addPrefix( 'preload', function ( resource ) { return resource; }); -$(function(){ +(function(){ var scripts = document.getElementById('script_front').getAttribute('data-scripts').split(','); for (var i=0; i<scripts.length; i++) { scripts[i] = 'preload!' + scripts[i]; } yepnope({ load: scripts }); -}); +})(); diff --git a/web/cobrands/fixmystreet/header.js b/web/cobrands/fixmystreet/header.js index 493facc7d..c4c3de1b6 100644 --- a/web/cobrands/fixmystreet/header.js +++ b/web/cobrands/fixmystreet/header.js @@ -1,3 +1,5 @@ +// A minimized version of this is inline in the header. + var fixmystreet = fixmystreet || {}; (function(D){ |