From f59e12ee3fa9c65f178a300954586f6ac91bba79 Mon Sep 17 00:00:00 2001 From: Matthew Somerville Date: Tue, 14 Nov 2017 16:23:11 +0000 Subject: Have front page load minimal JS necessary. By creating a small file with only what is needed (focus, js flagging), we can drop loading jQuery and all the application JavaScript on the front page, prefetching them instead. --- web/js/front.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 web/js/front.js (limited to 'web/js/front.js') diff --git a/web/js/front.js b/web/js/front.js new file mode 100644 index 000000000..d2c814490 --- /dev/null +++ b/web/js/front.js @@ -0,0 +1,13 @@ +document.getElementById('pc').focus(); + +(function(){ + var around_forms = document.querySelectorAll('form[action*="around"]'); + for (var i=0; i