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", "alwaysVisibleButton",
"disableChangelog", "disableChangelog",
"downloadPopup", "downloadPopup",
"wukkoDragonEmoji",
"disableTikTokWatermark", "disableTikTokWatermark",
"fullTikTokAudio", "fullTikTokAudio",
"muteAudio", "muteAudio",
@ -290,6 +291,14 @@ function checkbox(action) {
case "alwaysVisibleButton": button(); break; case "alwaysVisibleButton": button(); break;
case "reduceTransparency": eid("cobalt-body").classList.toggle('no-transparency'); break; case "reduceTransparency": eid("cobalt-body").classList.toggle('no-transparency'); break;
case "disableAnimations": eid("cobalt-body").classList.toggle('no-animation'); 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(); action === "disableChangelog" && sGet(action) === "true" ? notificationCheck("disable") : notificationCheck();
} }
@ -543,6 +552,14 @@ function loadSettings() {
} }
if (sGet("downloadPopup") === "true" && !isIOS) if (sGet("downloadPopup") === "true" && !isIOS)
eid("downloadPopup").checked = true; 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) if (sGet("reduceTransparency") === "true" || isOldFirefox)
eid("cobalt-body").classList.add('no-transparency'); eid("cobalt-body").classList.add('no-transparency');
if (sGet("disableAnimations") === "true") if (sGet("disableAnimations") === "true")

View File

@ -43,6 +43,7 @@
"SettingsKeepDownloadButton": "keep >> visible", "SettingsKeepDownloadButton": "keep >> visible",
"AccessibilityKeepDownloadButton": "keep the download button always visible", "AccessibilityKeepDownloadButton": "keep the download button always visible",
"SettingsEnableDownloadPopup": "ask how to save", "SettingsEnableDownloadPopup": "ask how to save",
"SettingsEnableWukkoDragonEmoji": "wukko dragon emoji",
"AccessibilityEnableDownloadPopup": "ask what to do with downloads", "AccessibilityEnableDownloadPopup": "ask what to do with downloads",
"SettingsQualityDescription": "if selected quality isn't available, closest one is used instead.", "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.", "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", action: "disableChangelog",
name: t("SettingsDisableNotifications"), name: t("SettingsDisableNotifications"),
}, {
action: "wukkoDragonEmoji",
name: t("SettingsEnableWukkoDragonEmoji"),
padding: "no-margin" padding: "no-margin"
}]) }])
}) })