From 33a5a60969d9f69379587495b42cca4f8875c3be Mon Sep 17 00:00:00 2001 From: wukko Date: Fri, 5 Apr 2024 11:57:06 +0600 Subject: [PATCH] front: remove an option to hide new version dot turns out this option was confusing people (and also didn't do much) --- src/front/cobalt.js | 18 ++++++++++-------- src/localization/languages/en.json | 1 - src/localization/languages/ru.json | 1 - src/modules/pageRender/page.js | 4 ---- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/front/cobalt.js b/src/front/cobalt.js index 9d022e6..ad2e9e5 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -22,7 +22,6 @@ const switchers = { }; const checkboxes = [ "alwaysVisibleButton", - "disableChangelog", "downloadPopup", "fullTikTokAudio", "muteAudio", @@ -171,17 +170,21 @@ function notificationCheck(type) { default: changed = false; } - if (changed && sGet("changelogStatus") === `${version}` || type === "disable") { + if (changed && sGet("changelogStatus") === `${version}`) { setTimeout(() => { eid("about-footer").innerHTML = eid("about-footer").innerHTML.replace(notification, ''); eid("tab-button-about-changelog").innerHTML = eid("tab-button-about-changelog").innerHTML.replace(notification, '') }, 900) } - if (sGet("disableChangelog") !== "true") { - if (!sGet("seenAbout") && !eid("about-footer").innerHTML.includes(notification)) eid("about-footer").innerHTML = `${notification}${eid("about-footer").innerHTML}`; - if (sGet("changelogStatus") !== `${version}`) { - if (!eid("about-footer").innerHTML.includes(notification)) eid("about-footer").innerHTML = `${notification}${eid("about-footer").innerHTML}`; - if (!eid("tab-button-about-changelog").innerHTML.includes(notification)) eid("tab-button-about-changelog").innerHTML = `${notification}${eid("tab-button-about-changelog").innerHTML}`; + if (!sGet("seenAbout") && !eid("about-footer").innerHTML.includes(notification)) { + eid("about-footer").innerHTML = `${notification}${eid("about-footer").innerHTML}`; + } + if (sGet("changelogStatus") !== `${version}`) { + if (!eid("about-footer").innerHTML.includes(notification)) { + eid("about-footer").innerHTML = `${notification}${eid("about-footer").innerHTML}`; + } + if (!eid("tab-button-about-changelog").innerHTML.includes(notification)) { + eid("tab-button-about-changelog").innerHTML = `${notification}${eid("tab-button-about-changelog").innerHTML}`; } } } @@ -298,7 +301,6 @@ function checkbox(action) { case "reduceTransparency": eid("cobalt-body").classList.toggle('no-transparency'); break; case "disableAnimations": eid("cobalt-body").classList.toggle('no-animation'); break; } - action === "disableChangelog" && sGet(action) === "true" ? notificationCheck("disable") : notificationCheck(); } function changeButton(type, text) { switch (type) { diff --git a/src/localization/languages/en.json b/src/localization/languages/en.json index 8450e11..546c284 100644 --- a/src/localization/languages/en.json +++ b/src/localization/languages/en.json @@ -80,7 +80,6 @@ "Miscellaneous": "miscellaneous", "ModeToggleAuto": "auto", "ModeToggleAudio": "audio", - "SettingsDisableNotifications": "hide notifications", "MediaPickerTitle": "pick what to save", "MediaPickerExplanationPC": "click or right click to download what you want.", "MediaPickerExplanationPhone": "press or press and hold to download what you want.", diff --git a/src/localization/languages/ru.json b/src/localization/languages/ru.json index a013ef5..8f66b5b 100644 --- a/src/localization/languages/ru.json +++ b/src/localization/languages/ru.json @@ -80,7 +80,6 @@ "Miscellaneous": "разное", "ModeToggleAuto": "авто", "ModeToggleAudio": "аудио", - "SettingsDisableNotifications": "cкрыть уведомления", "MediaPickerTitle": "выбери, что сохранить", "MediaPickerExplanationPC": "кликни то, что хочешь скачать. также можно скачать правой кнопки мыши.", "MediaPickerExplanationPhone": "нажми, или нажми и удерживай, чтобы скачать.", diff --git a/src/modules/pageRender/page.js b/src/modules/pageRender/page.js index 3a8b6c6..58bb3a9 100644 --- a/src/modules/pageRender/page.js +++ b/src/modules/pageRender/page.js @@ -523,10 +523,6 @@ export default function(obj) { }, { action: "disableMetadata", name: t("SettingsDisableMetadata") - }, { - action: "disableChangelog", - name: t("SettingsDisableNotifications"), - padding: "no-margin" }]) }) }]