From 4daf81dfcba97665d6a9beec86bb2bb3fe836be7 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 14 Nov 2017 12:57:16 +0000 Subject: Use modern prefetch. This removes the yepnope library, instead using with a polyfill (the polyfill will work on Safari but reload cached script on the front page each time). We prefetch map-related JavaScript (and other libraries only used on map pages, such as Dropzone and Fancybox) on non-map pages, and don't bother loading the validate plugin on the front page. Now the map JavaScript list is available everywhere, we can use that in the prefetch rather a hardcoded list. --- templates/web/base/front/javascript.html | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 templates/web/base/front/javascript.html (limited to 'templates/web/base/front/javascript.html') diff --git a/templates/web/base/front/javascript.html b/templates/web/base/front/javascript.html deleted file mode 100644 index 69eb626f7..000000000 --- a/templates/web/base/front/javascript.html +++ /dev/null @@ -1,12 +0,0 @@ -[% -# Assume using OpenStreetMap maps -map_js = [ - version('/vendor/yepnope.js'), - [ version('/cobrands/fixmystreet/front.js'), { - id = 'script_front', - 'data-scripts' = version('/vendor/OpenLayers/OpenLayers.fixmystreet.js') _ ',' _ - version('/js/map-OpenLayers.js') _ ',' _ - version('/js/map-OpenStreetMap.js') - } ], -] -%] -- cgit v1.2.3