formatting
This commit is contained in:
parent
1d34b2da10
commit
836bd56ce4
|
@ -98,18 +98,16 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
|
||||||
let options: TabQueryOptions? = jsonDeserialize(json: m!.data)
|
let options: TabQueryOptions? = jsonDeserialize(json: m!.data)
|
||||||
if options?.currentWindow ?? false {
|
if options?.currentWindow ?? false {
|
||||||
SFSafariApplication.getActiveWindow { win in
|
SFSafariApplication.getActiveWindow { win in
|
||||||
processWindowsForTabs(wins: [win!], options: options
|
processWindowsForTabs(wins: [win!], options: options, complete: { tabs in
|
||||||
, complete: { tabs in
|
m!.responseData = jsonSerialize(obj: tabs)
|
||||||
m!.responseData = jsonSerialize(obj: tabs)
|
self.replyMessage(message: m!)
|
||||||
self.replyMessage(message: m!)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
SFSafariApplication.getAllWindows { wins in
|
SFSafariApplication.getAllWindows { wins in
|
||||||
processWindowsForTabs(wins: wins, options: options
|
processWindowsForTabs(wins: wins, options: options, complete: { tabs in
|
||||||
, complete: { tabs in
|
m!.responseData = jsonSerialize(obj: tabs)
|
||||||
m!.responseData = jsonSerialize(obj: tabs)
|
self.replyMessage(message: m!)
|
||||||
self.replyMessage(message: m!)
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -341,9 +339,3 @@ class TabMessage: Decodable, Encodable {
|
||||||
class TabMessageOptions: Decodable, Encodable {
|
class TabMessageOptions: Decodable, Encodable {
|
||||||
var frameId: Int?
|
var frameId: Int?
|
||||||
}
|
}
|
||||||
|
|
||||||
class DownloadFileMessage: Decodable, Encodable {
|
|
||||||
var fileName: String
|
|
||||||
var data: String?
|
|
||||||
var type: String?
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue