wukko dragon emoji

This commit is contained in:
Spax 2024-02-14 23:22:00 -07:00
parent 5530ef6661
commit 236b3db775
3 changed files with 21 additions and 0 deletions

View File

@ -24,6 +24,7 @@ const checkboxes = [
"alwaysVisibleButton",
"disableChangelog",
"downloadPopup",
"wukkoDragonEmoji",
"disableTikTokWatermark",
"fullTikTokAudio",
"muteAudio",
@ -290,6 +291,14 @@ function checkbox(action) {
case "alwaysVisibleButton": button(); break;
case "reduceTransparency": eid("cobalt-body").classList.toggle('no-transparency'); break;
case "disableAnimations": eid("cobalt-body").classList.toggle('no-animation'); break;
case "wukkoDragonEmoji":
for (const emoji of document.getElementsByClassName("emoji"))
if (emoji.attributes.src.value.match(/emoji\/dragon_face(?:_wukko)?\.svg/) !== null)
if (sGet("wukkoDragonEmoji") === "true")
emoji.attributes.src.value = "emoji/dragon_face_wukko.svg";
else
emoji.attributes.src.value = "emoji/dragon_face.svg";
break;
}
action === "disableChangelog" && sGet(action) === "true" ? notificationCheck("disable") : notificationCheck();
}
@ -543,6 +552,14 @@ function loadSettings() {
}
if (sGet("downloadPopup") === "true" && !isIOS)
eid("downloadPopup").checked = true;
if (sGet("wukkoDragonEmoji") === "true")
eid("wukkoDragonEmoji").checked = true;
for (const emoji of document.getElementsByClassName("emoji"))
if (emoji.attributes.src.value.match(/emoji\/dragon_face(?:_wukko)?\.svg/) !== null)
if (sGet("wukkoDragonEmoji") === "true")
emoji.attributes.src.value = "emoji/dragon_face_wukko.svg";
else
emoji.attributes.src.value = "emoji/dragon_face.svg";
if (sGet("reduceTransparency") === "true" || isOldFirefox)
eid("cobalt-body").classList.add('no-transparency');
if (sGet("disableAnimations") === "true")

View File

@ -43,6 +43,7 @@
"SettingsKeepDownloadButton": "keep >> visible",
"AccessibilityKeepDownloadButton": "keep the download button always visible",
"SettingsEnableDownloadPopup": "ask how to save",
"SettingsEnableWukkoDragonEmoji": "wukko dragon emoji",
"AccessibilityEnableDownloadPopup": "ask what to do with downloads",
"SettingsQualityDescription": "if selected quality isn't available, closest one is used instead.",
"NoScriptMessage": "cobalt uses javascript for api requests and interactive interface. you have to allow javascript to use this site. there are no pesty scripts, pinky promise.",

View File

@ -507,6 +507,9 @@ export default function(obj) {
}, {
action: "disableChangelog",
name: t("SettingsDisableNotifications"),
}, {
action: "wukkoDragonEmoji",
name: t("SettingsEnableWukkoDragonEmoji"),
padding: "no-margin"
}])
})