Use WKUserScript to inject scripts into the page. Use permalink as base URL.

This commit is contained in:
Brent Simmons
2023-11-25 11:29:56 -08:00
parent 7222dcde6f
commit 279a99259e
7 changed files with 43 additions and 22 deletions

View File

@@ -594,7 +594,7 @@ private extension WebViewController {
]
let html = try! MacroProcessor.renderedText(withTemplate: ArticleRenderer.page.html, substitutions: substitutions)
webView.loadHTMLString(html, baseURL: ArticleRenderer.page.baseURL)
webView.loadHTMLString(html, baseURL: URL(string: rendering.baseURL))
}