diff --git a/Mac/MainWindow/Detail/DetailWebViewController.swift b/Mac/MainWindow/Detail/DetailWebViewController.swift index 47866c4cd..6fd354244 100644 --- a/Mac/MainWindow/Detail/DetailWebViewController.swift +++ b/Mac/MainWindow/Detail/DetailWebViewController.swift @@ -74,12 +74,11 @@ final class DetailWebViewController: NSViewController { } static let userScripts: [WKUserScript] = { - let appScriptsWorld = WKContentWorld.world(name: "NetNewsWire") let filenames = ["main", "main_mac", "newsfoot"] let scripts = filenames.map { filename in let scriptURL = Bundle.main.url(forResource: filename, withExtension: ".js")! let scriptSource = try! String(contentsOf: scriptURL) - return WKUserScript(source: scriptSource, injectionTime: .atDocumentStart, forMainFrameOnly: true, in: appScriptsWorld) + return WKUserScript(source: scriptSource, injectionTime: .atDocumentStart, forMainFrameOnly: true) } return scripts }() diff --git a/Shared/Article Rendering/main.js b/Shared/Article Rendering/main.js index 1cf76b59c..7894adeb4 100644 --- a/Shared/Article Rendering/main.js +++ b/Shared/Article Rendering/main.js @@ -170,6 +170,5 @@ function processPage() { } document.addEventListener("DOMContentLoaded", function(event) { - window.scrollTo(0, [[windowScrollY]]); processPage(); })