mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-26 12:25:20 +01:00
open tab on create new tab message
This commit is contained in:
parent
fc7bbed965
commit
78343d3e60
@ -152,8 +152,13 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe
|
||||
m!.responseData = popoverOpenCount > 0 ? "true" : "false";
|
||||
replyMessage(message: m!)
|
||||
} else if command == "createNewTab" {
|
||||
// TODO
|
||||
replyMessage(message: m!)
|
||||
if m!.data != nil {
|
||||
SFSafariApplication.getActiveWindow { win in
|
||||
win?.openTab(with: URL(string: m!.data!)!, makeActiveIfPossible: true, completionHandler: { _ in
|
||||
// Tab opened
|
||||
})
|
||||
}
|
||||
}
|
||||
} else if command == "reloadExtension" {
|
||||
webView?.reload()
|
||||
replyMessage(message: m!)
|
||||
|
Loading…
Reference in New Issue
Block a user