aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/front/javascript.html
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2017-11-14 12:57:16 +0000
committerMatthew Somerville <matthew-github@dracos.co.uk>2017-11-15 16:01:00 +0000
commit4daf81dfcba97665d6a9beec86bb2bb3fe836be7 (patch)
treee50d9f9dfbfc333dcc9a19196e492af8464e63f2 /templates/web/base/front/javascript.html
parent979ec73bedd10aa8d0c07e17a53a2a2d8e517e6f (diff)
Use modern prefetch.
This removes the yepnope library, instead using <link rel="prefetch"> 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.
Diffstat (limited to 'templates/web/base/front/javascript.html')
-rw-r--r--templates/web/base/front/javascript.html12
1 files changed, 0 insertions, 12 deletions
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')
- } ],
-]
-%]