DrekiOrmur
He/Him
New member
From my testing in Simple-Chat I didn't see any immediate issues, but I was wanting to double check if I'm understanding JS correctly and not setting myself up for a headache I need to rebuild/workaround later.
so in loadSettings, each of the settings I see is being referenced by the 'const groupName'...
But in the later getData() it is instead referencing the ID; 'const groupName = defineSetting('Lorem Ipsum', 'testName', 'group'...
If I make it so the const groupName == id and thus can just copy+paste the loadSettings block into the getData()'s block, are there any issues/implications? Or is it just purely style/preference?
so in loadSettings, each of the settings I see is being referenced by the 'const groupName'...
But in the later getData() it is instead referencing the ID; 'const groupName = defineSetting('Lorem Ipsum', 'testName', 'group'...
If I make it so the const groupName == id and thus can just copy+paste the loadSettings block into the getData()'s block, are there any issues/implications? Or is it just purely style/preference?
Original :: constraint name / ID | Modified :: constraint name == ID |
slime2.widget.loadSettings('simple-chat-data.js', [ defineSetting( [ 'Simple Chat v3.0.1 by Zaytri: https://zaytri.com/', '', 'Questions and Support: https://forums.slime2.stream/threads/20/', ].join('\n'), 'title', 'text-display', ), animationSettings, badgeSettings, alignmentSettings, disappearingSettings, emoteSettings, filterSettings, pronounsSettings, soundSettings, textSettings, ]) | slime2.widget.loadSettings('simple-chat-data.js', [ defineSetting( [ 'Simple Chat v3.0.1 by Zaytri: https://zaytri.com/', '', 'Questions and Support: https://forums.slime2.stream/threads/20/', ].join('\n'), 'title', 'text-display', ), animationSettings, badgeSettings, alignmentSettings, disappearingSettings, emoteSettings, filterSettings, pronounsSettings, soundSettings, textSettings, ]) |
const data = slime2.widget.getData() const { alignment, textStyles, animations, disappear, emotes, badges, pronouns, sound, } = data | const data = slime2.widget.getData() const { animationSettings, badgeSettings, alignmentSettings, disappearingSettings, emoteSettings, filterSettings, pronounsSettings, soundSettings, textSettings, } = data |