File tree Expand file tree Collapse file tree
AnimeSailProvider/src/main/kotlin/com/animesail Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -71,6 +71,10 @@ class TurnstileInterceptor(private val targetCookie: String = "_as_turnstile") :
7171 val newWebView = WebView (context)
7272 webView = newWebView
7373
74+ newWebView.resumeTimers()
75+ newWebView.resume()
76+ newWebView.layoutParams = android.view.ViewGroup .LayoutParams (1080 , 1920 )
77+
7478 cookieManager.setAcceptCookie(true )
7579 cookieManager.setAcceptThirdPartyCookies(newWebView, true )
7680
@@ -80,7 +84,14 @@ class TurnstileInterceptor(private val targetCookie: String = "_as_turnstile") :
8084 databaseEnabled = true
8185 loadWithOverviewMode = true
8286 useWideViewPort = true
83- userAgentString = userAgent.ifBlank { userAgentString }
87+ mediaPlaybackRequiresUserGesture = false
88+ javaScriptCanOpenWindowsAutomatically = true
89+ mixedContentMode = android.webkit.WebSettings .MIXED_CONTENT_ALWAYS_ALLOW
90+ var customUa = userAgent.ifBlank { userAgentString }
91+ if (customUa.contains(" ; wv" )) {
92+ customUa = customUa.replace(" ; wv" , " " )
93+ }
94+ userAgentString = customUa
8495 }
8596 userAgent = newWebView.settings.userAgentString ? : userAgent
8697
You can’t perform that action at this time.
0 commit comments