Skip to content

Commit 4d22939

Browse files
improvement
1 parent 50b58a0 commit 4d22939

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

AnimeSailProvider/src/main/kotlin/com/animesail/AnimeSailProvider.kt

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)