From 734fe9c297173fff2ff52db2508d3c8add63a288 Mon Sep 17 00:00:00 2001 From: Richard Hansen Date: Mon, 19 Oct 2020 12:43:49 -0400 Subject: [PATCH] Use jQuery methods to build DOM elements --- src/static/js/pad_automatic_reconnect.js | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/src/static/js/pad_automatic_reconnect.js b/src/static/js/pad_automatic_reconnect.js index b5b99bcd..65e7bc0c 100644 --- a/src/static/js/pad_automatic_reconnect.js +++ b/src/static/js/pad_automatic_reconnect.js @@ -21,11 +21,21 @@ var createCountDownElementsIfNecessary = function($modal) { var $reconnectButton = $modal.find('#forcereconnect'); // create extra DOM elements, if they don't exist - var $reconnectTimerMessage = $('

\ - Trying to reconnect in \ - \ -

'); - var $cancelReconnect = $(''); + const $reconnectTimerMessage = + $('

') + .addClass('reconnecttimer') + .append( + $('') + .attr('data-l10n-id', 'pad.modals.reconnecttimer') + .text('Trying to reconnect in ')) + .append( + $('') + .addClass('timetoexpire')); + const $cancelReconnect = + $('