diff --git a/package.json b/package.json index 05daa2f1..2c77d38c 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "cobalt", "description": "save what you love", - "version": "4.3.2", + "version": "4.4", "author": "wukko", "exports": "./src/cobalt.js", "type": "module", diff --git a/src/config.json b/src/config.json index 6697cd76..3eafd780 100644 --- a/src/config.json +++ b/src/config.json @@ -15,12 +15,11 @@ }, "donations": { "crypto": { + "bitcoin": "bc1q59jyyjvrzj4c22rkk3ljeecq6jmpyscgz9spnd", "ethereum": "0x4B4cF23051c78c7A7E0eA09d39099621c46bc302", - "bitcoin": "bc1q64amsn0wd60urem3jkhpywed8q8kqwssw6ta5j", - "litecoin": "ltc1qvp0xhrk2m7pa6p6z844qcslfyxv4p3vf95rhna", - "bitcoin cash": "bitcoincash:qph0d7d02mvg5xxqjwjv5ahjx2254yx5kv0zfg0xsj" + "litecoin": "ltc1qvp0xhrk2m7pa6p6z844qcslfyxv4p3vf95rhna" }, - "other": { + "links": { "boosty": "https://boosty.to/wukko" } }, @@ -34,7 +33,7 @@ "02-17": "😺", "02-22": "😺", "03-01": "😺", - "05-26": "🀄", + "05-26": "🎂", "08-08": "😺", "08-26": "🐶", "10-29": "😺", diff --git a/src/front/cobalt.js b/src/front/cobalt.js index 30ba26f6..b77c63b2 100644 --- a/src/front/cobalt.js +++ b/src/front/cobalt.js @@ -155,6 +155,7 @@ function popup(type, action, text) { switch (type) { case "about": let tabId = sGet("seenAbout") ? "changelog" : "about"; + if (text) tabId = text; eid(`tab-button-${type}-${tabId}`).click(); break; case "settings": diff --git a/src/front/emoji/cake.svg b/src/front/emoji/cake.svg new file mode 100644 index 00000000..c6de34d4 --- /dev/null +++ b/src/front/emoji/cake.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/front/updateBanners/catsleep.webp b/src/front/updateBanners/catsleep.webp new file mode 100644 index 00000000..a63d1f5c Binary files /dev/null and b/src/front/updateBanners/catsleep.webp differ diff --git a/src/front/updateBanners/onemillionr.webp b/src/front/updateBanners/onemillionr.webp new file mode 100644 index 00000000..69ee499e Binary files /dev/null and b/src/front/updateBanners/onemillionr.webp differ diff --git a/src/localization/languages/en.json b/src/localization/languages/en.json index 87aed723..b4792696 100644 --- a/src/localization/languages/en.json +++ b/src/localization/languages/en.json @@ -13,7 +13,6 @@ "AccessibilityOpenAbout": "open about popup", "AccessibilityDownloadButton": "download button", "AccessibilityOpenSettings": "open settings popup", - "AccessibilityOpenChangelog": "view changelog popup", "AccessibilityClosePopup": "close the popup", "AccessibilityOpenDonate": "open donation popup", "TitlePopupAbout": "what's {appName}?", @@ -55,11 +54,8 @@ "AccessibilityEnableDownloadPopup": "ask what to do with downloads", "SettingsFormatDescription": "select webm if you want max quality available. webm videos are usually higher bitrate, but ios devices can't play them natively.", "SettingsQualityDescription": "if selected quality isn't available, closest one gets picked instead.\nif you want to post a youtube video on social media, then select a combination of mp4 and 720p. those videos are usually not in av1 codec, so they should play just fine basically everywhere.", - "DonateSubtitle": "help me pay for hosting", - "DonateDescription": "i don't really like crypto in its current state, but it's the only reliable way for me to receive money and pay for anything abroad.", "LinkGitHubIssues": ">> report issues and check out the source code on github", "LinkGitHubChanges": ">> see previous commits and contribute on github", - "LinkDonateContact": ">> let me know if currency you want to donate isn't listed", "NoScriptMessage": "{appName} uses javascript for api requests and interactive interface. you have to allow javascript to use this site. i don't have any ads or trackers, pinky promise.", "DownloadPopupDescriptionIOS": "on ios devices, you have to press and hold the download button, hide the video preview, and then select \"download linked file\" in appeared popup to save the video. this will be required for as long as apple forces safari webview upon all browser developers on ios.", "DownloadPopupDescription": "download button opens a new tab with requested file. you can disable this popup in settings.", @@ -75,7 +71,7 @@ "SettingsOtherTab": "other", "ChangelogLastMajor": "current version & commit", "AccessibilityModeToggle": "toggle download mode", - "DonateLinksDescription": "donation links open in a new tab. this is the best way to donate money, if you want me to receive it directly.", + "DonateLinksDescription": "donation links open in a new tab. this is the best way to donate if you want me to receive your donation directly.", "SettingsAudioFormatBest": "best", "SettingsAudioFormatDescription": "when best format is selected, you get audio in best quality available, because audio is kept in its original format. if you select anything other than that, you'll get a slightly compressed file.", "Keyphrase": "save what you love", @@ -95,7 +91,7 @@ "PasteFromClipboard": "paste from clipboard", "FollowTwitter": "follow {appName}'s twitter account for polls, updates, and more: @justusecobalt", "ChangelogOlder": "previous versions", - "ChangelogPressToExpand": "press to load", + "ChangelogPressToExpand": "press to expand", "Miscellaneous": "miscellaneous", "ModeToggleAuto": "auto mode", "ModeToggleAudio": "audio mode", @@ -106,6 +102,11 @@ "MediaPickerExplanationPhoneIOS": "press and hold, hide the preview, and then select \"download linked file\" to save.", "TwitterSpaceWasntRecorded": "this twitter space wasn't recorded, so there's nothing to download. try another one!", "ErrorCantProcess": "i couldn't process your request :(\nyou can try again, but if issue persists, please {ContactLink}.", - "ChangelogPressToHide": "press to hide" + "ChangelogPressToHide": "press to hide", + "Donate": "donate", + "DonateSub": "help me keep it up", + "DonateExplanation": "{appName} does not (and will never) serve ads or sell your data, therefore it's completely free to use. but hey! turns out keeping up a web service used by hundreds of thousands of people is somewhat costly.\n\nif you ever found {appName} useful and want to keep it online, or simply want to thank the developer, consider chipping in! each and every cent helps and is VERY appreciated.", + "DonateVia": "donate via", + "DonateHireMe": "or, as an alternative, you can hire me." } } diff --git a/src/localization/languages/ru.json b/src/localization/languages/ru.json index 8d532dec..b4c97dd0 100644 --- a/src/localization/languages/ru.json +++ b/src/localization/languages/ru.json @@ -13,7 +13,6 @@ "AccessibilityOpenAbout": "открыть окно с инфой", "AccessibilityDownloadButton": "кнопка скачивания", "AccessibilityOpenSettings": "открыть настройки", - "AccessibilityOpenChangelog": "просмотреть последние изменения (на английском)", "AccessibilityClosePopup": "закрыть окно", "AccessibilityOpenDonate": "сделать пожертвование", "TitlePopupAbout": "что за {appName}?", @@ -55,11 +54,8 @@ "AccessibilityEnableDownloadPopup": "спрашивать, что делать с загрузками", "SettingsFormatDescription": "выбирай webm, если хочешь максимальное качество. у webm видео битрейт обычно выше, но устройства на ios не могут проигрывать их без сторонних приложений.", "SettingsQualityDescription": "если выбранное качество недоступно, то выбирается ближайшее к нему.\nесли ты хочешь опубликовать видео с youtube где-то в соц. сетях, то выбирай комбинацию из mp4 и 720p. у таких видео кодек обычно не av1, поэтому они должны работать практически везде.", - "DonateSubtitle": "помоги мне платить за хостинг", - "DonateDescription": "я не люблю крипто в его текущем состоянии, но у меня нет другого надёжного способа оплаты хостинга.", "LinkGitHubIssues": ">> сообщай о проблемах и смотри исходный код на гитхабе", "LinkGitHubChanges": ">> смотри предыдущие изменения на гитхабе", - "LinkDonateContact": ">> напиши мне, если в этом списке нет подходящей валюты", "NoScriptMessage": "{appName} использует javascript для обработки ссылок и интерактивного интерфейса. ты должен разрешить использование javascript, чтобы пользоваться сайтом. тут нет никаких трекеров или рекламы, обещаю.", "DownloadPopupDescriptionIOS": "так как у тебя устройство на ios, тебе нужно зажать кнопку \"скачать\", затем скрыть превью видео и выбрать \"загрузить файл по ссылке\" в появившемся окне.", "DownloadPopupDescription": "кнопка скачивания открывает новое окно с файлом. ты можешь отключить выбор метода сохранения файла в настройках.", @@ -75,7 +71,7 @@ "SettingsOtherTab": "другое", "ChangelogLastMajor": "текущая версия и коммит (на английском)", "AccessibilityModeToggle": "переключить режим скачивания", - "DonateLinksDescription": "ссылки на донаты открываются в новой вкладке. это лучший метод пожертвовать деньги, если ты хочешь, чтобы я получил их лично, а не в виде крипто.", + "DonateLinksDescription": "ссылки на донаты открываются в новой вкладке. это наилучший способ отправить донат, если ты хочешь, чтобы я получил его напрямую.", "SettingsAudioFormatBest": "лучший", "SettingsAudioFormatDescription": "когда выбран \"лучший\" формат, ты получишь аудио максимально возможного качества, так как оно останется в оригинальном формате. если же выбрано что-то другое, то аудио будет немного сжато.", "Keyphrase": "сохраняй то, что любишь", @@ -95,7 +91,7 @@ "PasteFromClipboard": "вставить из буфера обмена", "FollowTwitter": "а ещё, в твиттере {appName} есть опросы, новости, и многое другое: @justusecobalt", "ChangelogOlder": "предыдущие версии (на английском)", - "ChangelogPressToExpand": "нажми, чтобы загрузить", + "ChangelogPressToExpand": "нажми, чтобы раскрыть", "Miscellaneous": "разное", "ModeToggleAuto": "авто режим", "ModeToggleAudio": "аудио режим", @@ -106,6 +102,11 @@ "MediaPickerExplanationPhoneIOS": "нажми и удерживай, затем скрой превью, и наконец выбери \"загрузить файл по ссылке\".", "TwitterSpaceWasntRecorded": "этот twitter space не был записан, поэтому я не могу его скачать. попробуй другой!", "ErrorCantProcess": "я не смог обработать твой запрос :(\nты можешь попробовать ещё раз, но если не поможет, то {ContactLink}.", - "ChangelogPressToHide": "нажми, чтобы скрыть" + "ChangelogPressToHide": "нажми, чтобы скрыть", + "Donate": "донаты", + "DonateSub": "ты можешь помочь!", + "DonateExplanation": "{appName} не пихает рекламу тебе в лицо и не продаёт твои личные данные, а значит работает совершенно бесплатно. но оказывается, что хостинг сервиса, которым пользуются сотни тысяч людей, обходится довольно дорого.\n\nесли ты хочешь, чтобы твой любимый загрузчик оставался онлайн, а разработчик не помер с голоду вместе с двумя котами, то подумай над тем, чтобы задонатить. каждый рубль поможет мне, моим котам, и {appName}!", + "DonateVia": "открыть", + "DonateHireMe": "или же ты можешь пригласить меня на работу." } } diff --git a/src/modules/changelog/changelog.json b/src/modules/changelog/changelog.json index 34fb3307..aa8be728 100644 --- a/src/modules/changelog/changelog.json +++ b/src/modules/changelog/changelog.json @@ -1,10 +1,15 @@ { "current": { + "version": "4.4", + "title": "over 1 million monthly requests. thank you.", + "banner": "onemillionr.webp", + "content": "this is a huge milestone for me, i cannot express enough how grateful i am for each and every one of you.\nthank you for using cobalt, and thank you for showing that people love the web that's friendly and bullshit-free. i'm hoping to never disappoint you in the future and keep up the good work.\n\nthank you <3\n\nif you want to thank ME, check out the renovated donations tab, which now is also linked alongside bottom action buttons." + }, + "history": [{ "version": "4.3.2", "title": "twitter improvements & changelog overhaul", "content": "- you can download explicit content from twitter.\n- direct video links from twitter are properly supported (video/1, video/2, etc.).\n- changelog history got support for banners.\n- changelog categories are not messy anymore.\n- {appName} version in changelogs is now highlighted.\n- changelog history got separators to make text easier to read.\n- changelog history can be collapsed after loading.\n- download button takes less time to change back to pressable state.\n\nif you're a developer and would like to play around with cobalt's api, then read more about it in older changelogs below!" - }, - "history": [{ + }, { "version": "4.3", "title": "developers, developers, developers, developers", "banner": "developersdevelopersdevelopers.webp", diff --git a/src/modules/emoji.js b/src/modules/emoji.js index 34a831e1..8f53bb4b 100644 --- a/src/modules/emoji.js +++ b/src/modules/emoji.js @@ -17,7 +17,8 @@ const names = { "🎄": "christmas_tree", "🕯️": "candle", "😺": "cat", - "🐶": "dog" + "🐶": "dog", + "🎂": "cake" } let sizing = { 22: 0.4, diff --git a/src/modules/pageRender/elements.js b/src/modules/pageRender/elements.js index 236e1dad..25bebb92 100644 --- a/src/modules/pageRender/elements.js +++ b/src/modules/pageRender/elements.js @@ -129,7 +129,13 @@ export function footerButtons(obj) { items += ``; break; case "popup": - items += ``; + let context = obj[i]["context"] ? `, '${obj[i]["context"]}'` : '' + let context2 = obj[i+1] && obj[i+1]["context"] ? `, '${obj[i+1]["context"]}'` : '' + items += ` + `; i++; break; } diff --git a/src/modules/pageRender/page.js b/src/modules/pageRender/page.js index 4c39f0bb..2c33443a 100644 --- a/src/modules/pageRender/page.js +++ b/src/modules/pageRender/page.js @@ -19,8 +19,8 @@ let audioFormats = supportedAudio.map((p) => { return { "action": p } }) audioFormats.unshift({ "action": "best" }) -for (let i in donations["other"]) { - donateLinks += `${i}` +for (let i in donations["links"]) { + donateLinks += `REPLACEME ${i}` } let extr = '' for (let i in donations["crypto"]) { @@ -135,22 +135,31 @@ export default function(obj) { header: { closeAria: loc(obj.lang, 'AccessibilityClosePopup'), title: emoji("💸", 30) + loc(obj.lang, 'TitlePopupDonate'), - subtitle: loc(obj.lang, 'DonateSubtitle') + subtitle: loc(obj.lang, 'DonateSub') }, body: [{ - text: donateLinks, + text: `
`, + raw: true + },{ + text: loc(obj.lang, 'DonateExplanation') + }, { + text: donateLinks.replace(/REPLACEME/g, loc(obj.lang, 'DonateVia')), raw: true }, { text: loc(obj.lang, 'DonateLinksDescription'), classes: ["explanation"] }, { - text: donate.replace(/REPLACEME/g, loc(obj.lang, 'ClickToCopy')) + text: `
`, + raw: true }, { - text: loc(obj.lang, 'DonateDescription'), - classes: ["explanation", "no-top-padding"] + text: donate.replace(/REPLACEME/g, loc(obj.lang, 'ClickToCopy')), + classes: ["desc-padding"] }, { - text: backdropLink(authorInfo.contact, loc(obj.lang, 'LinkDonateContact')), - classes: ["bottom-link"] + text: `
`, + raw: true + }, { + text: loc(obj.lang, 'DonateHireMe', authorInfo.link), + classes: ["desc-padding"] }] }) }], @@ -314,6 +323,12 @@ export default function(obj) { type: "popup", text: `${emoji(celebrationsEmoji() , 22)} ${loc(obj.lang, 'AboutTab')}`, aria: loc(obj.lang, 'AccessibilityOpenAbout') + }, { + name: "about", + type: "popup", + context: "donate", + text: `${emoji("💰", 22)} ${loc(obj.lang, 'Donate')}`, + aria: loc(obj.lang, 'AccessibilityOpenDonate') }, { name: "settings", type: "popup",