mirror of
https://github.com/rebelonion/Dantotsu.git
synced 2026-01-30 18:41:02 +00:00
fix networking on some extensions
This commit is contained in:
@@ -17,12 +17,14 @@ import uy.kohesive.injekt.api.get
|
||||
|
||||
class CookieCatcher : AppCompatActivity() {
|
||||
@SuppressLint("SetJavaScriptEnabled")
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
ThemeManager(this).applyTheme()
|
||||
|
||||
//get url from intent
|
||||
val url = intent.getStringExtra("url") ?: "https://www.youtube.com/watch?v=dQw4w9WgXcQ"
|
||||
val headers: Map<String, String> = intent.getSerializableExtra("headers") as? Map<String, String> ?: emptyMap()
|
||||
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
|
||||
val process = Application.getProcessName()
|
||||
@@ -54,7 +56,7 @@ class CookieCatcher : AppCompatActivity() {
|
||||
}
|
||||
}
|
||||
|
||||
webView.loadUrl(url)
|
||||
webView.loadUrl(url, headers)
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user