diff --git a/mobile/src/changelog.ts b/mobile/src/changelog.ts index a3dc745..7baddc0 100644 --- a/mobile/src/changelog.ts +++ b/mobile/src/changelog.ts @@ -16,6 +16,13 @@ export type ChangelogEntry = { }; export const CHANGELOG: ChangelogEntry[] = [ + { + id: '2026-08-22c', + date: 'August 2026', + items: [ + 'Fixed the black screen on older galaxyporn scenes. The player was covering the host page for a fixed 15 seconds, so by the time anything appeared there was nothing left to see. Now the page shows the moment it needs you, and when the app can grab the video file itself it skips the page entirely and plays it in the normal player.', + ], + }, { id: '2026-08-22b', date: 'August 2026', diff --git a/mobile/src/screens/PlayerScreen.tsx b/mobile/src/screens/PlayerScreen.tsx index 80b1e19..2144436 100644 --- a/mobile/src/screens/PlayerScreen.tsx +++ b/mobile/src/screens/PlayerScreen.tsx @@ -1167,30 +1167,44 @@ const INJECTED_JS = ` // na natywny odtwarzacz, gdy tylko pojawi sie adres pliku. try { if (/(^|\\.)vikingfile\\.com$/i.test(location.hostname)) { + // UWAGA: NIE chowamy tu reszty strony. Pierwsza wersja robila dokladnie to i user + // dostawal CZARNY EKRAN zamiast pustej strony, bo gdy widget zabezpieczenia sie nie + // wyrenderuje, na czarnym tle nie zostaje juz nic. Gorsze niz stan wyjsciowy. Teraz + // tylko podswietlamy wlasciwe miejsce i przewijamy do niego, wiec najgorszy przypadek + // to normalna strona hostera, czyli to, co user widzial przed ta zmiana. var vkCss = document.createElement('style'); vkCss.textContent = [ - 'html,body{background:#000!important;margin:0!important;padding:0!important}', - '#logo,#toggle-theme,footer,#file-information,#progress-current,#archive,', - '#embed-code,#download-parallel,#download-parallel-progress{display:none!important}', - '.page-container,.content-wrap{max-width:100%!important;margin:0!important;padding:0!important}', - '#captcha-download{display:flex!important;flex-direction:column!important;', - 'align-items:center!important;justify-content:center!important;', - 'min-height:100vh!important;gap:14px!important}', - '#goon-vk-hint{color:#fff;font:600 15px system-ui,sans-serif;text-align:center;padding:0 24px}', - 'video{width:100vw!important;max-height:100vh!important;background:#000!important}', + '#captcha-download{outline:2px solid #e05a6d!important;border-radius:10px!important;', + 'padding:14px!important;margin:12px auto!important;max-width:520px!important}', + '#goon-vk-hint{color:#e05a6d;font:600 15px system-ui,sans-serif;text-align:center;', + 'padding:8px 0}', + 'video:not(.hidden){width:100vw!important;max-height:100vh!important;background:#000!important}', ].join(''); (document.head || document.documentElement).appendChild(vkCss); + var vkScrolled = false; var vkReady = function() { var box = document.getElementById('captcha-download'); if (box && !document.getElementById('goon-vk-hint')) { var hint = document.createElement('div'); hint.id = 'goon-vk-hint'; - hint.textContent = 'Tap the checkbox to start the video'; + hint.textContent = 'Tap the box below to start the video'; box.insertBefore(hint, box.firstChild); } + if (box && !vkScrolled) { + vkScrolled = true; + try { box.scrollIntoView({ block: 'center' }); } catch (e) {} + } + // Nakladka "Loading video..." zaslania strone przez 15 sekund. Dla hostera, ktory + // WYMAGA kliknięcia, to znaczy 15 sekund gapienia sie w spinner, a potem dopiero + // szansa na interakcje. Gdy widget zabezpieczenia sie wyrenderuje, mowimy o tym + // aplikacji, zeby zdjela nakladke od razu. + var cap = document.getElementById('captcha'); + if (cap && cap.innerHTML !== '' && !window.__goonVkAsked && window.ReactNativeWebView) { + window.__goonVkAsked = true; + window.ReactNativeWebView.postMessage(JSON.stringify({ type: 'needs_interaction' })); + } var v = document.querySelector('video'); if (v && v.className.indexOf('hidden') === -1) { - if (box) box.style.display = 'none'; var vc = document.getElementById('video-container'); if (vc) vc.style.cssText = 'position:fixed;inset:0;z-index:99999;background:#000'; } @@ -1839,6 +1853,13 @@ function EmbedWebViewPlayer({ params }: { params: RouteParams }) { if (isLikelyAd(data.url)) return; setExtractedUrl((curr) => curr ?? data.url); } + // Strona zglasza, ze czeka na klikniecie (widget zabezpieczenia sie wyrenderowal). + // Zdejmujemy zaslone OD RAZU zamiast po 15 sekundach, inaczej user gapi sie w + // spinner, a potem i tak musi kliknac. Zgloszenie: "galaxyporn czarny ekran po + // Loading video". + if (data.type === 'needs_interaction') { + setRevealEmbed(true); + } } catch { // not JSON }