Add a menu item to the Debug menu to enable the Web Inspector

Just enables the "Inspect Element" item in a WKWebView's contextual menu at the moment.
This commit is contained in:
Nate Weaver
2019-09-16 21:06:35 -05:00
parent 66d9333999
commit e39fa31bf7
5 changed files with 53 additions and 0 deletions

View File

@@ -36,6 +36,8 @@ struct AppDefaults {
static let timelineShowsSeparators = "CorreiaSeparators"
static let showTitleOnMainWindow = "KafasisTitleMode"
static let hideDockUnreadCount = "JustinMillerHideDockUnreadCount"
static let webInspectorEnabled = "WebInspectorEnabled"
}
private static let smallestFontSizeRawValue = FontSize.small.rawValue
@@ -138,6 +140,15 @@ struct AppDefaults {
return bool(for: Key.hideDockUnreadCount)
}
static var webInspectorEnabled: Bool {
get {
return bool(for: Key.webInspectorEnabled)
}
set {
setBool(for: Key.webInspectorEnabled, newValue)
}
}
static var timelineSortDirection: ComparisonResult {
get {
return sortDirection(for: Key.timelineSortDirection)