Skip to content

best way to save what you love

fix streamable downloads on ios

wukko2038050a2d5a
diff --git a/src/front/cobalt.js b/src/front/cobalt.js
index c5a13eff..23ea0e88 100644
--- a/src/front/cobalt.js
+++ b/src/front/cobalt.js
@@ -412,7 +412,9 @@ async function download(url) {
let jp = await res.json();
if (jp.status === "continue") {
changeDownloadButton(2, '>>>');
- window.open(j.url, '_blank');
+ if (isMobile) {
+ window.location.href = j.url;
+ } else window.open(j.url, '_blank');
setTimeout(() => { changeButton(1) }, 2500);
} else {
changeButton(0, jp.text);