mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-29 00:31:14 +00:00
Use a WebKit user-agent string for web content (content displayed in web views) with NetNewsWire as the app name.
This commit is contained in:
1 parent
4d9a6407f4
commit
f8df32529b
2 files changed
+4
-4
No files matched your search
@@ -9,7 +9,6 @@
|
||||
import AppKit
|
||||
@preconcurrency import WebKit
|
||||
import RSCore
|
||||
import RSWeb
|
||||
import Articles
|
||||
import Images
|
||||
|
||||
@@ -96,9 +95,6 @@ final class DetailWebViewController: NSViewController {
|
||||
webView.navigationDelegate = self
|
||||
webView.keyboardDelegate = keyboardDelegate
|
||||
webView.translatesAutoresizingMaskIntoConstraints = false
|
||||
if let userAgent = UserAgent.fromInfoPlist() {
|
||||
webView.customUserAgent = userAgent
|
||||
}
|
||||
|
||||
view = webView
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@ import WebKit
|
||||
configuration.setURLSchemeHandler(urlSchemeHandler, forURLScheme: ArticleRenderer.imageIconScheme)
|
||||
configuration.userContentController = userContentController
|
||||
|
||||
// Present article content as NetNewsWire on top of WebKit's default browser UA, rather than a non-browser string.
|
||||
// <https://github.com/Ranchero-Software/NetNewsWire/issues/4453>
|
||||
configuration.applicationNameForUserAgent = "NetNewsWire"
|
||||
|
||||
#if os(iOS)
|
||||
configuration.allowsInlineMediaPlayback = true
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user