From c5d8220766342939b516e2fb56c61dee7b9df55f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABl=20Nison?= Date: Sun, 18 Nov 2018 15:13:39 +0000 Subject: [PATCH] Fixes a bug --- index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index 13d3787..457520f 100755 --- a/index.html +++ b/index.html @@ -274,8 +274,8 @@ for ( var t = 0, T = names.length; t < T; ++ t ) { - var displayName = names[ t ]; - var name = names[ t ].replace( /\([^)]+\)/g, ' ' ).replace( / +/g, ' ' ).trim(); + var name = names[ t ]; + var prettyName = names[ t ].replace( /\([^)]+\)/g, ' ' ).replace( / +/g, ' ' ).trim(); var tr = document.createElement( 'tr' ); tr.className = 'result-row'; @@ -296,15 +296,15 @@ var encryptedPairing = CryptoJS.AES.encrypt( pairings[ name ], key ); var pairingPath = window.location.pathname.replace( /[^/]+$/, '' ) + 'pairing.html'; - var pairingQueryString = '?name=' + encodeURIComponent( name ) + '&key=' + encodeURIComponent( key ) + '&pairing=' + encodeURIComponent( encryptedPairing ); + var pairingQueryString = '?name=' + encodeURIComponent( prettyName ) + '&key=' + encodeURIComponent( key ) + '&pairing=' + encodeURIComponent( encryptedPairing ); if ( isAmazonEnabled() ) pairingQueryString += '&extra=1'; - tdName.innerText = displayName; + tdName.innerText = name; link.addEventListener( 'click', protect ); - link.setAttribute( 'data-name', displayName ); + link.setAttribute( 'data-name', name ); link.href = window.location.protocol + '//' + window.location.host + pairingPath + pairingQueryString; link.innerText = link.href;