Minor code changes

This commit is contained in:
00Fjongl 2024-07-07 02:20:32 -05:00
parent 552f8ae4e9
commit 450465a01b

View file

@ -32,24 +32,26 @@ const insertText = (lis, str, newText) => {
// changes with each time it is loaded. // changes with each time it is loaded.
const randomListItem = lis => () => lis[Math.random() * lis.length | 0], const randomListItem = lis => () => lis[Math.random() * lis.length | 0],
charset = ["&#173;", "&#8203;", "&shy;"], charset = ["&#173;", "&#8203;", "&shy;", "<wbr>"],
getRandomChar = randomListItem(charRandom),
insertCharset = str => insertText( insertCharset = str => insertText(
charset, charset,
str, str,
randomListItem(charRandom) getRandomChar
), ),
getRandomSplash = randomListItem(splashRandom),
hutaoInsert = str => insertText( hutaoInsert = str => insertText(
"<!--HUTAOWOA-->", "<!--HUTAOWOA-->",
str, str,
randomListItem(splashRandom) getRandomSplash
), ),
cookingText = () => `<span style="display:none" data-fact="${randomListItem(vegetables)()}">${randomListItem(cookingInserts)()}</span>`, getCookingText = () => `<span style="display:none" data-fact="${randomListItem(vegetables)()}">${randomListItem(cookingInserts)()}</span>`,
insertCooking = str => insertText( insertCooking = str => insertText(
"<!-- IMPORTANT-HUTAOCOOKINGINSERT-DONOTDELETE -->", "<!-- IMPORTANT-HUTAOCOOKINGINSERT-DONOTDELETE -->",
str, str,
cookingText getCookingText
), ),
// This one isn't for obfuscation; it's just for dealing with cache issues. // This one isn't for obfuscation; it's just for dealing with cache issues.