From 43a3fa79aa665af53b57774d3c5e0a9d0761bddc Mon Sep 17 00:00:00 2001 From: Adrian Moennich Date: Mon, 13 May 2019 17:01:24 +0200 Subject: [PATCH] URSH: Fix js issues --- ursh/indico_ursh/client/index.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ursh/indico_ursh/client/index.js b/ursh/indico_ursh/client/index.js index 5d84c8d..9592a94 100644 --- a/ursh/indico_ursh/client/index.js +++ b/ursh/indico_ursh/client/index.js @@ -62,11 +62,10 @@ function _validateAndFormatURL(url) { } // extract tokens - let protocol = urlTokens[1]; const hostname = urlTokens[2]; const path = urlTokens[3] ? urlTokens[3] : '/'; - protocol = location.protocol; // patch protocol to match server + const protocol = location.protocol; // patch protocol to match server if (hostname !== location.hostname) { throw Error($t.gettext('Invalid host: only Indico URLs are allowed')); } @@ -129,7 +128,7 @@ $(document) .on('click', '.ursh-get', _handleUrshClick) .on('input', '#ursh-custom-shortcut-input', (evt) => { const value = $(evt.target).val(); - $('#ursh-custom-shortcut-submit-button').prop('disabled', !_validateUrshCustomShortcut(value)) + $('#ursh-custom-shortcut-submit-button').prop('disabled', !_validateUrshCustomShortcut(value)); }) .on('mouseenter', '#ursh-custom-shortcut-submit-button', (evt) => { if (evt.target.disabled) {