Skip to content

Commit fadc291

Browse files
committed
format
1 parent 5071c24 commit fadc291

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

GitHub One Monokai/AppDelegate.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,17 @@
22
// Created by Do Vien on 27/01/2023 at 01:01.
33
//
44
// Copyright © 2023 CPea2506. All rights reserved.
5-
//
6-
5+
//
76

87
import Cocoa
98

109
@main
1110
class AppDelegate: NSObject, NSApplicationDelegate {
12-
13-
func applicationDidFinishLaunching(_ notification: Notification) {
11+
func applicationDidFinishLaunching(_: Notification) {
1412
// Override point for customization after application launch.
1513
}
1614

17-
func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool {
15+
func applicationShouldTerminateAfterLastWindowClosed(_: NSApplication) -> Bool {
1816
return true
1917
}
20-
2118
}

GitHub One Monokai/ViewController.swift

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ class ViewController: NSViewController, WKNavigationDelegate, WKScriptMessageHan
1818
override func viewDidLoad() {
1919
super.viewDidLoad()
2020

21-
self.webView.navigationDelegate = self
21+
webView.navigationDelegate = self
2222

23-
self.webView.configuration.userContentController.add(self, name: "controller")
23+
webView.configuration.userContentController.add(self, name: "controller")
2424

25-
self.webView.loadFileURL(Bundle.main.url(forResource: "Main", withExtension: "html")!, allowingReadAccessTo: Bundle.main.resourceURL!)
25+
webView.loadFileURL(Bundle.main.url(forResource: "Main", withExtension: "html")!, allowingReadAccessTo: Bundle.main.resourceURL!)
2626
}
2727

28-
func webView(_ webView: WKWebView, didFinish navigation: WKNavigation!) {
28+
func webView(_ webView: WKWebView, didFinish _: WKNavigation!) {
2929
SFSafariExtensionManager.getStateOfSafariExtension(withIdentifier: extensionBundleIdentifier) { state, error in
3030
guard let state = state, error == nil else {
3131
debugPrint("Something went wrong: \(error!.localizedDescription)")
@@ -42,7 +42,7 @@ class ViewController: NSViewController, WKNavigationDelegate, WKScriptMessageHan
4242
}
4343
}
4444

45-
func userContentController(_ userContentController: WKUserContentController, didReceive message: WKScriptMessage) {
45+
func userContentController(_: WKUserContentController, didReceive message: WKScriptMessage) {
4646
if message.body as! String != "open-preferences" {
4747
return
4848
}

0 commit comments

Comments
 (0)