aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/kotlin/com/pitchedapps/frost/web
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/kotlin/com/pitchedapps/frost/web')
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt2
-rw-r--r--app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt6
2 files changed, 7 insertions, 1 deletions
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt
index 8d4deef8..199e9cfb 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/DebugWebView.kt
@@ -26,6 +26,7 @@ import android.webkit.WebView
import ca.allanwang.kau.utils.withAlpha
import com.pitchedapps.frost.facebook.USER_AGENT
import com.pitchedapps.frost.injectors.CssHider
+import com.pitchedapps.frost.injectors.CssSmallAssets
import com.pitchedapps.frost.injectors.jsInject
import com.pitchedapps.frost.utils.L
import com.pitchedapps.frost.utils.Prefs
@@ -116,6 +117,7 @@ class DebugWebView @JvmOverloads constructor(
(url?.contains("?sk=h_chr") ?: false) &&
prefs.aggressiveRecents
),
+ CssSmallAssets.FullSizeImage.maybe(prefs.fullSizeImage),
prefs = prefs
)
}
diff --git a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
index 4d635547..9e0c64ab 100644
--- a/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
+++ b/app/src/main/kotlin/com/pitchedapps/frost/web/FrostWebViewClients.kt
@@ -29,6 +29,7 @@ import com.pitchedapps.frost.facebook.FbItem
import com.pitchedapps.frost.facebook.WWW_FACEBOOK_COM
import com.pitchedapps.frost.facebook.formattedFbUrl
import com.pitchedapps.frost.injectors.CssHider
+import com.pitchedapps.frost.injectors.CssSmallAssets
import com.pitchedapps.frost.injectors.JsActions
import com.pitchedapps.frost.injectors.JsAssets
import com.pitchedapps.frost.injectors.jsInject
@@ -80,6 +81,7 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() {
super.doUpdateVisitedHistory(view, url, isReload)
urlSupportsRefresh = urlSupportsRefresh(url)
web.parent.swipeEnabled = urlSupportsRefresh
+ view.jsInject(JsAssets.AUTO_RESIZE_TEXTAREA, prefs = prefs)
v { "History $url; refresh $urlSupportsRefresh" }
}
@@ -126,10 +128,12 @@ open class FrostWebViewClient(val web: FrostWebView) : BaseWebViewClient() {
(web.url?.contains("?sk=h_chr") ?: false) &&
prefs.aggressiveRecents
),
+ CssHider.ADS.maybe(!prefs.showFacebookAds),
+ CssSmallAssets.FullSizeImage.maybe(prefs.fullSizeImage),
JsAssets.DOCUMENT_WATCHER,
JsAssets.HORIZONTAL_SCROLLING,
+ JsAssets.AUTO_RESIZE_TEXTAREA,
JsAssets.CLICK_A,
- CssHider.ADS.maybe(!prefs.showFacebookAds),
JsAssets.CONTEXT_A,
JsAssets.MEDIA,
prefs = prefs