diff --git a/package.json b/package.json
index 0c0d69eb..874b470f 100644
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "cobalt",
"description": "save what you love",
- "version": "3.5.5",
+ "version": "3.6",
"author": "wukko",
"exports": "./src/cobalt.js",
"type": "module",
diff --git a/src/config.json b/src/config.json
index 6a0ddb11..8434c240 100644
--- a/src/config.json
+++ b/src/config.json
@@ -11,7 +11,7 @@
"internetExplorerRedirect": {
"newNT": ["6.1", "6.2", "6.3", "10.0"],
"old": "https://mypal-browser.org/",
- "new": "https://vivaldi.com/"
+ "new": "https://www.mozilla.org/firefox/new/"
},
"donations": {
"crypto": {
diff --git a/src/front/cobalt.css b/src/front/cobalt.css
index 58459c1a..1dc6faab 100644
--- a/src/front/cobalt.css
+++ b/src/front/cobalt.css
@@ -175,6 +175,9 @@ input[type="checkbox"] {
}
#cobalt-main-box #bottom {
padding-top: 1.5rem;
+ display: flex;
+ flex-direction: row;
+ justify-content: space-between;
}
#cobalt-main-box #bottom button {
width: auto!important;
@@ -224,7 +227,7 @@ input[type="checkbox"] {
cursor: not-allowed;
}
#footer {
- bottom: 0rem;
+ bottom: 0.8rem;
position: absolute;
left: 50%;
transform: translate(-50%, -50%);
@@ -232,6 +235,11 @@ input[type="checkbox"] {
text-align: center;
width: auto;
}
+#cobalt-main-box #bottom,
+#footer-buttons,
+#footer-buttons, .footer-pair {
+ gap: 0.8rem;
+}
#footer-buttons, .footer-pair {
display: flex;
flex-direction: row;
@@ -241,7 +249,6 @@ input[type="checkbox"] {
width: auto!important;
color: var(--accent-unhover-2);
padding: 0.6rem 1.2rem!important;
- margin: 0.4rem;
align-content: center;
}
.text-backdrop {
@@ -370,7 +377,13 @@ input[type="checkbox"] {
margin-bottom: 1rem;
}
.bottom-margin {
- margin-bottom: 1rem;
+ margin-bottom: 1rem!important;
+}
+.top-margin {
+ margin-top: 1rem!important;
+}
+.no-margin {
+ margin: 0!important;
}
.checkbox {
display: inline-flex;
@@ -397,9 +410,6 @@ input[type="checkbox"] {
padding-bottom: 0.4rem;
color: var(--accent);
}
-.extra {
- margin-top: 1rem;
-}
.small-padding .subtitle {
margin-top: 0.5rem;
}
@@ -432,6 +442,7 @@ input[type="checkbox"] {
color: var(--background);
background: var(--accent);
cursor: default;
+ z-index: 999
}
.switches {
display: flex;
@@ -605,6 +616,9 @@ input[type="checkbox"] {
}
}
@media screen and (max-width: 949px) {
+ #cobalt-main-box #bottom {
+ flex-direction: column;
+ }
#cobalt-main-box #bottom button {
width: 100%!important;
}
diff --git a/src/front/cobalt.js b/src/front/cobalt.js
index 0c82b7c7..39e9f592 100644
--- a/src/front/cobalt.js
+++ b/src/front/cobalt.js
@@ -1,5 +1,4 @@
let isIOS = navigator.userAgent.toLowerCase().match("iphone os");
-let isFirefox = navigator.userAgent.toLowerCase().match("firefox/");
let version = 10;
let regex = new RegExp(/https:\/\/(www\.)?[-a-zA-Z0-9@:%._\+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-a-zA-Z0-9()!@:%_\+.~#?&\/\/=]*)/);
@@ -9,9 +8,8 @@ let switchers = {
"quality": ["max", "hig", "mid", "low"],
"audioFormat": ["best", "mp3", "ogg", "wav", "opus"]
}
-let checkboxes = ["disableTikTokWatermark", "fullTikTokAudio"];
-if (!isFirefox) checkboxes.push("disableClipboardButton");
-let exceptions = { // used solely for ios devices, because they're less capable than everything else.
+let checkboxes = ["disableTikTokWatermark", "fullTikTokAudio", "disableClipboardButton"];
+let exceptions = { // used solely for ios devices, because they're generally less capable
"ytFormat": "mp4",
"audioFormat": "mp3"
}
@@ -218,7 +216,13 @@ function toggle(toggl) {
updateToggle(toggl, sGet(toggl))
}
function loadSettings() {
- if (sGet("disableClipboardButton") == "true" && !isFirefox) eid("pasteFromClipboard").style.display = "none";
+ try {
+ typeof(navigator.clipboard.readText)
+ } catch (err) {
+ eid("disableClipboardButton-chkbx").style.display = "none";
+ sSet("disableClipboardButton", "true")
+ }
+ if (sGet("disableClipboardButton") == "true") eid("pasteFromClipboard").style.display = "none";
if (sGet("alwaysVisibleButton") == "true") {
eid("alwaysVisibleButton").checked = true;
eid("download-button").value = '>>'
diff --git a/src/localization/languages/en.json b/src/localization/languages/en.json
index 5ad362da..9d8dd327 100644
--- a/src/localization/languages/en.json
+++ b/src/localization/languages/en.json
@@ -39,7 +39,6 @@
"SettingsAppearanceSubtitle": "appearance",
"SettingsThemeSubtitle": "theme",
"SettingsFormatSubtitle": "download format",
- "SettingsMiscSubtitle": "more settings",
"SettingsDownloadsSubtitle": "downloads",
"SettingsQualitySubtitle": "quality",
"SettingsThemeAuto": "auto",
@@ -84,8 +83,6 @@
"SettingsDisableChangelogOnUpdate": "don't show changelog after major updates",
"SettingsRemoveWatermark": "disable watermark",
"ErrorPopupCloseButton": "got it",
- "ModeToggle": "mode",
- "ModeToggleSmart": "smart",
"ErrorLengthAudioConvert": "current length limit for audio conversion is {s} minutes. pick \"best\" format if you want to avoid limitations.",
"SettingsAudioFullTikTok": "download full audio",
"SettingsAudioFullTikTokDescription": "downloads original audio or sound used in video without any additional changes by the video author.",
@@ -101,6 +98,9 @@
"SettingsDisableClipboard": "hide clipboard button",
"FollowTwitter": "follow {appName}'s twitter account for polls, updates, and more: @justusecobalt",
"ChangelogOlder": "previous updates",
- "ChangelogPressToExpand": "press to load"
+ "ChangelogPressToExpand": "press to load",
+ "Miscellaneous": "miscellaneous",
+ "ModeToggleAuto": "auto mode",
+ "ModeToggleAudio": "audio mode"
}
}
diff --git a/src/localization/languages/ru.json b/src/localization/languages/ru.json
index 0b94675f..3b16065a 100644
--- a/src/localization/languages/ru.json
+++ b/src/localization/languages/ru.json
@@ -101,6 +101,9 @@
"SettingsDisableClipboard": "скрыть кнопку буфера обмена",
"FollowTwitter": "а ещё, в твиттере {appName} есть опросы, новости, и многое другое: @justusecobalt",
"ChangelogOlder": "предыдущие обновления (на английском)",
- "ChangelogPressToExpand": "нажми, чтобы загрузить"
+ "ChangelogPressToExpand": "нажми, чтобы загрузить",
+ "Miscellaneous": "разное",
+ "ModeToggleAuto": "авто режим",
+ "ModeToggleAudio": "аудио режим"
}
}
diff --git a/src/modules/changelog/changelog.json b/src/modules/changelog/changelog.json
index c01f1e42..fdfb865f 100644
--- a/src/modules/changelog/changelog.json
+++ b/src/modules/changelog/changelog.json
@@ -1,9 +1,13 @@
{
"current": {
- "title": "tiktok support is back :D (3.5.4)",
- "content": "you can download videos, sounds, and images from tiktok again!\nhuge thank you to @minzique for finding another api endpoint that works.\n\nif you don't want to see this popup anymore, you can disable it in settings > other."
+ "title": "improvements all around! (3.6)",
+ "content": "- download mode switcher is moving places, it's now right next to link input area.\n- smart mode has been renamed to auto mode, because this name is easier to understand.\n- all spacings in ui have been evened out. no more eye strain.\n- clipboard button exception has been redone to prepare for adoption of readtext clipboard api in firefox.\n- cobalt is now using different tiktok api endpoint, because previous one got killed, just like the one before.\n- \"other\" settings tab has been cleaned up."
},
+ "DisableIfYouWant": "\n\nif you don't want to see this popup after every major update, you can disable it in settings > other.",
"history": [{
+ "title": "tiktok support is back :D (3.5.4)",
+ "content": "you can download videos, sounds, and images from tiktok again!\nhuge thank you to @minzique for finding another api endpoint that works."
+ }, {
"title": "vk clips support, improved changelog system, and less bugs (3.5.2)",
"content": "new features: \n- added support for vk clips. {appName} now lets you download even more cringy videos!\n- added update history right to the changelog menu. it's not loaded by default to minimize page load time, but can be loaded upon pressing a button. probably someone will enjoy this.\n- as you've just read, cobalt now has on-demand blocks. they're rendered on server upon request and exist to prevent any unnecessary clutter by default. the first feature to use on-demand rendering is history of updates in changelog tab.\n\nchanges:\n- moved twitter entry to about tab and made it localized.\n- added clarity to what services exactly are supported in about tab.\n\nbug fixes:\n- cobalt should no longer crash to firefox users if they love to play around with user-agent switching.\n- vk videos of any resolution and aspect ratio should now be downloadable.\n- vk quality picking has been fixed after vk broke it for parsers on their side."
}, {
diff --git a/src/modules/changelog/changelogManager.js b/src/modules/changelog/changelogManager.js
index 55258c71..73fd0ccb 100644
--- a/src/modules/changelog/changelogManager.js
+++ b/src/modules/changelog/changelogManager.js
@@ -17,6 +17,8 @@ export default function(string) {
content: replaceBase(i["content"])
}
});
+ default:
+ return replaceBase(changelog[string])
}
} catch (e) {
return `!!CHANGELOG_${string}!!`
diff --git a/src/modules/pageRender/elements.js b/src/modules/pageRender/elements.js
index 0e77e26b..ef07d872 100644
--- a/src/modules/pageRender/elements.js
+++ b/src/modules/pageRender/elements.js
@@ -19,8 +19,20 @@ export function switcher(obj) {
`
}
-export function checkbox(action, text, aria) {
- return `