diff --git a/readeck/UI/Components/NativeWebView.swift b/readeck/UI/Components/NativeWebView.swift
index 8a8ebda..09e85f5 100644
--- a/readeck/UI/Components/NativeWebView.swift
+++ b/readeck/UI/Components/NativeWebView.swift
@@ -50,16 +50,8 @@ struct NativeWebView: View {
try? await Task.sleep(nanoseconds: UInt64(delay * 1_000_000_000))
do {
- // Try to get height via JavaScript - use direct expression instead of function call
- let result = try await webPage.callJavaScript("""
- Math.max(
- document.body.scrollHeight || 0,
- document.body.offsetHeight || 0,
- document.documentElement.clientHeight || 0,
- document.documentElement.scrollHeight || 0,
- document.documentElement.offsetHeight || 0
- )
- """)
+ // Try to get height via JavaScript - use simple document.body.scrollHeight
+ let result = try await webPage.callJavaScript("document.body.scrollHeight")
if let height = result as? Double, height > 0 {
let cgHeight = CGFloat(height)
@@ -119,11 +111,6 @@ struct NativeWebView: View {