From 972fef9d508b05c24d89ed7535c629768afb18be Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Tue, 20 Aug 2019 23:16:35 -0400 Subject: [PATCH] get app version from url --- .../desktop/safari/SafariExtensionViewController.swift | 6 +----- src/safari/app/desktop/safari/app/popup/index.html | 9 ++------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/src/safari/app/desktop/safari/SafariExtensionViewController.swift b/src/safari/app/desktop/safari/SafariExtensionViewController.swift index 91b4c33085..87be65be43 100644 --- a/src/safari/app/desktop/safari/SafariExtensionViewController.swift +++ b/src/safari/app/desktop/safari/SafariExtensionViewController.swift @@ -69,11 +69,7 @@ class SafariExtensionViewController: SFSafariExtensionViewController, WKScriptMe } let command = m!.command // print(command) - if command == "windowLoaded" { - // let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String - // webView.evaluateJavaScript("window.bitwardenApplicationVersion = '\(version!)';", completionHandler: nil) - // Set things - } else if command == "storage_get" { + if command == "storage_get" { let obj = UserDefaults.standard.string(forKey: m!.data!) m!.responseData = obj replyMessage(message: m!) diff --git a/src/safari/app/desktop/safari/app/popup/index.html b/src/safari/app/desktop/safari/app/popup/index.html index f3b1fd860d..9c709f70d0 100644 --- a/src/safari/app/desktop/safari/app/popup/index.html +++ b/src/safari/app/desktop/safari/app/popup/index.html @@ -14,15 +14,10 @@