mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2025-08-12 06:26:36 +00:00
Use custom user agent for web views
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
import Foundation
|
||||
import WebKit
|
||||
import RSWeb
|
||||
|
||||
class PreloadedWebView: WKWebView {
|
||||
|
||||
@@ -28,6 +29,10 @@ class PreloadedWebView: WKWebView {
|
||||
configuration.setURLSchemeHandler(articleIconSchemeHandler, forURLScheme: ArticleRenderer.imageIconScheme)
|
||||
|
||||
super.init(frame: .zero, configuration: configuration)
|
||||
|
||||
if let userAgent = UserAgent.fromInfoPlist() {
|
||||
customUserAgent = userAgent
|
||||
}
|
||||
}
|
||||
|
||||
required init?(coder: NSCoder) {
|
||||
|
||||
Reference in New Issue
Block a user