pad: Delete duplicate `decodeURIComponent()` calls

`URL.searchParams` already decodes the value.

Also delete some useless comments.
This commit is contained in:
Richard Hansen 2021-12-04 21:04:22 -05:00
parent 6beb5dcaf5
commit f4257a28ba
1 changed files with 4 additions and 8 deletions

View File

@ -95,24 +95,20 @@ const getParameters = [
settings.useMonospaceFontGlobal = true;
},
},
// If the username is set as a parameter we should set a global value that we can call once we
// have initiated the pad.
{
name: 'userName',
checkVal: null,
callback: (val) => {
settings.globalUserName = decodeURIComponent(val);
clientVars.userName = decodeURIComponent(val);
settings.globalUserName = val;
clientVars.userName = val;
},
},
// If the userColor is set as a parameter, set a global value to use once we have initiated the
// pad.
{
name: 'userColor',
checkVal: null,
callback: (val) => {
settings.globalUserColor = decodeURIComponent(val);
clientVars.userColor = decodeURIComponent(val);
settings.globalUserColor = val;
clientVars.userColor = val;
},
},
{