mirror of
https://github.com/revanced/revanced-manager.git
synced 2025-04-29 21:44:26 +02:00
im very good at this
This commit is contained in:
parent
56ff299fa0
commit
afb8c26bf2
@ -184,9 +184,7 @@ public abstract interface class app/revanced/manager/plugin/downloader/webview/W
|
||||
public final class app/revanced/manager/plugin/downloader/webview/WebViewScope : app/revanced/manager/plugin/downloader/Scope {
|
||||
public final fun download (Lkotlin/jvm/functions/Function5;)V
|
||||
public fun getHostPackageName ()Ljava/lang/String;
|
||||
public final fun getJsEnabled ()Z
|
||||
public fun getPluginPackageName ()Ljava/lang/String;
|
||||
public final fun pageLoad (Lkotlin/jvm/functions/Function3;)V
|
||||
public final fun setJsEnabled (Z)V
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
package app.revanced.manager.plugin.downloader.webview
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import app.revanced.manager.plugin.downloader.DownloadUrl
|
||||
import app.revanced.manager.plugin.downloader.DownloaderScope
|
||||
import app.revanced.manager.plugin.downloader.GetScope
|
||||
@ -45,12 +44,6 @@ class WebViewScope<T> internal constructor(
|
||||
private lateinit var webView: IWebView
|
||||
internal lateinit var initialUrl: String
|
||||
|
||||
/**
|
||||
* Controls whether JavaScript is enabled in the WebView. The default value is false.
|
||||
* Changing this after the WebView has been launched has no effect.
|
||||
*/
|
||||
var jsEnabled = false
|
||||
|
||||
internal val binder = object : IWebViewEvents.Stub() {
|
||||
override fun ready(iface: IWebView?) {
|
||||
coroutineScope.launch(dispatcher) {
|
||||
@ -128,7 +121,7 @@ suspend fun <T> GetScope.runWebView(
|
||||
requestStartActivity(Intent().apply {
|
||||
putExtra(
|
||||
WebViewActivity.KEY,
|
||||
WebViewActivity.Parameters(title, scope.jsEnabled, scope.binder)
|
||||
WebViewActivity.Parameters(title, scope.binder)
|
||||
)
|
||||
setClassName(
|
||||
hostPackageName,
|
||||
|
@ -41,7 +41,7 @@ class WebViewActivity : ComponentActivity() {
|
||||
}
|
||||
val params = intent.getParcelableExtra<Parameters>(KEY)!!
|
||||
actionBar?.apply {
|
||||
title = intent.getStringExtra(params.title)
|
||||
title = params.title
|
||||
setHomeAsUpIndicator(android.R.drawable.ic_menu_close_clear_cancel)
|
||||
setDisplayHomeAsUpEnabled(true)
|
||||
}
|
||||
@ -55,7 +55,7 @@ class WebViewActivity : ComponentActivity() {
|
||||
databaseEnabled = false
|
||||
allowContentAccess = false
|
||||
domStorageEnabled = false
|
||||
javaScriptEnabled = params.jsEnabled
|
||||
javaScriptEnabled = true
|
||||
}
|
||||
|
||||
webViewClient = vm.webViewClient
|
||||
@ -88,7 +88,7 @@ class WebViewActivity : ComponentActivity() {
|
||||
|
||||
@Parcelize
|
||||
internal class Parameters(
|
||||
val title: String, val jsEnabled: Boolean, val events: IBinder
|
||||
val title: String, val events: IBinder
|
||||
) : Parcelable
|
||||
|
||||
internal companion object {
|
||||
|
Loading…
x
Reference in New Issue
Block a user