Automatically trim arl for spaces and newlines

This commit is contained in:
RemixDev 2020-05-31 10:59:42 +02:00
parent 6bc4997ff3
commit b99d158085
4 changed files with 5 additions and 5 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -58,7 +58,7 @@ socket.on('logging_in', function () {
})
socket.on('init_autologin', function () {
let arl = localStorage.getItem('arl')
let arl = localStorage.getItem('arl').trim()
let accountNum = localStorage.getItem('accountNum')
if (arl){
if (accountNum != 0){

View File

@ -67,7 +67,7 @@ const SettingsTab = new Vue({
this.spotifyFeatures = spotifyCredentials
},
login() {
let arl = this.$refs.loginInput.value
let arl = this.$refs.loginInput.value.trim()
if (arl != '' && arl != localStorage.getItem('arl')) {
socket.emit('login', arl, true, this.accountNum)
}
@ -103,7 +103,7 @@ const SettingsTab = new Vue({
this.$refs.loggedInInfo.classList.add('hide')
if (localStorage.getItem('arl')) {
this.$refs.loginInput.value = localStorage.getItem('arl')
this.$refs.loginInput.value = localStorage.getItem('arl').trim()
}
if (localStorage.getItem('accountNum')) {
this.accountNum = localStorage.getItem('accountNum')