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

View file

@ -95,24 +95,20 @@ const getParameters = [
settings.useMonospaceFontGlobal = true; 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', name: 'userName',
checkVal: null, checkVal: null,
callback: (val) => { callback: (val) => {
settings.globalUserName = decodeURIComponent(val); settings.globalUserName = val;
clientVars.userName = decodeURIComponent(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', name: 'userColor',
checkVal: null, checkVal: null,
callback: (val) => { callback: (val) => {
settings.globalUserColor = decodeURIComponent(val); settings.globalUserColor = val;
clientVars.userColor = decodeURIComponent(val); clientVars.userColor = val;
}, },
}, },
{ {