mirror of
https://github.com/Ranchero-Software/NetNewsWire.git
synced 2025-02-02 12:06:58 +01:00
Use custom user agent for web views
This commit is contained in:
parent
8656bffe18
commit
855907404e
@ -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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user