diff --git a/safari/Universal/Kagi Search.xcodeproj/xcuserdata/nano.xcuserdatad/xcschemes/xcschememanagement.plist b/safari/Universal/Kagi Search.xcodeproj/xcuserdata/nano.xcuserdatad/xcschemes/xcschememanagement.plist
deleted file mode 100644
index 07e4f91..0000000
--- a/safari/Universal/Kagi Search.xcodeproj/xcuserdata/nano.xcuserdatad/xcschemes/xcschememanagement.plist
+++ /dev/null
@@ -1,72 +0,0 @@
-
-
-
-
- SchemeUserState
-
- Kagi Search (iOS).xcscheme_^#shared#^_
-
- orderHint
- 0
-
- Kagi Search (macOS).xcscheme_^#shared#^_
-
- orderHint
- 1
-
- Kagi Search Extension (iOS).xcscheme_^#shared#^_
-
- orderHint
- 0
-
- Kagi Search Extension (macOS).xcscheme_^#shared#^_
-
- orderHint
- 3
-
- Kagi Search iOS (Legacy).xcscheme_^#shared#^_
-
- orderHint
- 1
-
- Kagi Search iOS.xcscheme_^#shared#^_
-
- orderHint
- 0
-
- Kagi Search macOS.xcscheme_^#shared#^_
-
- orderHint
- 2
-
- Kagi Search.xcscheme_^#shared#^_
-
- orderHint
- 2
-
-
- SuppressBuildableAutocreation
-
- 3EC7722C2B2C48CE00E40354
-
- primary
-
-
- 3ED5D4CD2B0DE3AD009DDDAD
-
- primary
-
-
- 3ED5D4E22B0DE3AF009DDDAD
-
- primary
-
-
- 3ED5D4EC2B0DE3AF009DDDAD
-
- primary
-
-
-
-
-
diff --git a/safari/Universal/MainConfig.xcconfig b/safari/Universal/MainConfig.xcconfig
index 9c8b7de..5249193 100644
--- a/safari/Universal/MainConfig.xcconfig
+++ b/safari/Universal/MainConfig.xcconfig
@@ -1,3 +1,3 @@
-MARKETING_VERSION = 2.2.2
-CURRENT_PROJECT_VERSION = 24 // this needs to be increased with each version change as well (not set to 1 when version is updated)
+MARKETING_VERSION = 2.2.3
+CURRENT_PROJECT_VERSION = 25 // this needs to be increased with each version change as well (not set to 1 when version is updated)
PRODUCT_NAME = Kagi for Safari
diff --git a/safari/Universal/Shared (Extension)/Resources/background.js b/safari/Universal/Shared (Extension)/Resources/background.js
index b6e373e..e667430 100644
--- a/safari/Universal/Shared (Extension)/Resources/background.js
+++ b/safari/Universal/Shared (Extension)/Resources/background.js
@@ -298,7 +298,7 @@ function domainKeyForHost(knownHost) {
}
return "";
}
-const supportedEngineNames = Object.keys(domainMap);
+const supportedEngineNames = Object.keys(domainMap).concat(["All"]);
const www = "www.";
const yahoo = "search.yahoo.com";
const extensionId = "com.kagi.Kagi-Search-for-Safari.Extension (TFVG979488)";
@@ -309,7 +309,7 @@ var ua = {},
os = !0,
rs = !0,
currentEngine = "All",
- defaultEngineToRedirect = "Google",
+ defaultEngineToRedirect = "All",
defaultKagiSearchTemplate = "https://kagi.com/search?q=%s",
kagiSearchTemplate = defaultKagiSearchTemplate,
kagiPrivateSearchTemplate = "",
@@ -339,7 +339,7 @@ function captureQuery(a) {
b.endsWith(yahoo) && (b = yahoo);
const path = a.pathname;
var shouldBlockGoogleNonSearch = (b in googleUrls && !(path.startsWith("/search")));
- var shouldBlockRedirectBasedOnUserPreference = ([currentEngine, "All"].indexOf(domainKeyForHost(b)) < 0);
+ var shouldBlockRedirectBasedOnUserPreference = (currentEngine != "All" && currentEngine != domainKeyForHost(b));
if (b in builtInEngines && !(shouldBlockGoogleNonSearch || shouldBlockRedirectBasedOnUserPreference) && (a = (new URLSearchParams(a.search)).get(builtInEngines[b]))) return a;
}
@@ -447,8 +447,8 @@ function getPreferencesFromStorage(callback) {
// Engine to redirect
var engine = value.kagiEngineToRedirect;
if (typeof (engine) == "string") {
- if (engine == "All" || supportedEngineNames.indexOf(engine) < 0) {
- currentEngine = defaultEngineToRedirect; // default to redirecting Google
+ if (supportedEngineNames.indexOf(engine) < 0) {
+ currentEngine = defaultEngineToRedirect; // default to redirecting All engines to Kagi
} else {
currentEngine = engine;
}
diff --git a/safari/Universal/Shared (Extension)/Resources/popup.html b/safari/Universal/Shared (Extension)/Resources/popup.html
index 5b40ae6..d839818 100644
--- a/safari/Universal/Shared (Extension)/Resources/popup.html
+++ b/safari/Universal/Shared (Extension)/Resources/popup.html
@@ -27,6 +27,7 @@
Engine to redirect
Select the search engine you want to redirect to Kagi.