Skip to content

Commit

Permalink
Remove inspect element
Browse files Browse the repository at this point in the history
  • Loading branch information
npezza93 committed Nov 16, 2023
1 parent 4fe5b81 commit 70217dc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions archipelago/SettingsController.swift
Expand Up @@ -18,13 +18,12 @@ class SettingsController: NSViewController, WKUIDelegate, NSWindowDelegate, Brid
webView = WKWebView(
frame: CGRect(x: 0, y: 0, width: 650, height: 283), configuration: .appConfiguration)

webView.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled")

webView.setValue(false, forKey: "drawsBackground")

webView.uiDelegate = self
webView.navigationDelegate = self
#if DEBUG
webView.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled")
webView.isInspectable = true
#endif
view = webView
Expand Down
3 changes: 1 addition & 2 deletions archipelago/ViewController.swift
Expand Up @@ -20,8 +20,6 @@ class ViewController: NSViewController, WKUIDelegate, NSWindowDelegate, BridgeDe
webView = WKWebView(
frame: CGRect(x: 0, y: 0, width: 800, height: 600), configuration: .appConfiguration)

webView.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled")

let script = WKUserScript(
source: monospsaceFontStylesheet(), injectionTime: .atDocumentStart, forMainFrameOnly: true)
webView.configuration.userContentController.addUserScript(script)
Expand All @@ -36,6 +34,7 @@ class ViewController: NSViewController, WKUIDelegate, NSWindowDelegate, BridgeDe
webView.uiDelegate = self
webView.navigationDelegate = self
#if DEBUG
webView.configuration.preferences.setValue(true, forKey: "developerExtrasEnabled")
webView.isInspectable = true
#endif
view = webView
Expand Down

0 comments on commit 70217dc

Please sign in to comment.