From 0cc5ae3e8063f1f831f29ee220551de1093be890 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Sat, 17 Mar 2018 07:33:58 +0100 Subject: [PATCH] Codestyle fixes for contact.js. --- sass/print.scss | 1 + static/js/contact.js | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/sass/print.scss b/sass/print.scss index dfa386d..80a4034 100644 --- a/sass/print.scss +++ b/sass/print.scss @@ -37,6 +37,7 @@ footer { width: 100%; } + // Underline all links. :link, :visited { text-decoration: underline; diff --git a/static/js/contact.js b/static/js/contact.js index 6e035cd..6b63c71 100644 --- a/static/js/contact.js +++ b/static/js/contact.js @@ -19,15 +19,15 @@ $('.contact-no-js').detach(); // Wait for a mouse to move, indicating they are human. - $('body').mousemove(function() { + $('body').mousemove(function () { // Unlock the form. $contact_form.attr('action', contact_action); $contact_button.attr('disabled', false); }); // A tab or enter key pressed can also indicate they are human. - $('body').keydown(function(e) { - if ((e.keyCode == 9) || (e.keyCode == 13)) { + $('body').keydown(function (e) { + if ((e.keyCode === 9) || (e.keyCode === 13)) { // Unlock the form. $contact_form.attr('action', contact_action); $contact_button.attr('disabled', false); @@ -40,8 +40,8 @@ }); // Display messages. - if (location.search.substring(1) != '') { - switch(location.search.substring(1)) { + if (location.search.substring(1) !== '') { + switch (location.search.substring(1)) { case 'submitted': $('.contact-submitted').removeClass('hidden'); break;