formatting

This commit is contained in:
Kyle Spearrin 2019-08-22 10:12:51 -04:00
parent 1d34b2da10
commit 836bd56ce4
1 changed files with 6 additions and 14 deletions

View File

@ -98,18 +98,16 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
let options: TabQueryOptions? = jsonDeserialize(json: m!.data)
if options?.currentWindow ?? false {
SFSafariApplication.getActiveWindow { win in
processWindowsForTabs(wins: [win!], options: options
, complete: { tabs in
m!.responseData = jsonSerialize(obj: tabs)
self.replyMessage(message: m!)
processWindowsForTabs(wins: [win!], options: options, complete: { tabs in
m!.responseData = jsonSerialize(obj: tabs)
self.replyMessage(message: m!)
})
}
} else {
SFSafariApplication.getAllWindows { wins in
processWindowsForTabs(wins: wins, options: options
, complete: { tabs in
m!.responseData = jsonSerialize(obj: tabs)
self.replyMessage(message: m!)
processWindowsForTabs(wins: wins, options: options, complete: { tabs in
m!.responseData = jsonSerialize(obj: tabs)
self.replyMessage(message: m!)
})
}
}
@ -341,9 +339,3 @@ class TabMessage: Decodable, Encodable {
class TabMessageOptions: Decodable, Encodable {
var frameId: Int?
}
class DownloadFileMessage: Decodable, Encodable {
var fileName: String
var data: String?
var type: String?
}