Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
improve isStoreURL check logic
Browse files Browse the repository at this point in the history
  • Loading branch information
ElonPark committed Sep 5, 2023
1 parent ee0ca25 commit c13f3d4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,11 @@ extension BrowserViewController: WKNavigationDelegate {
// leave a 'Back to Safari' button in the status bar, which we do not want.
fileprivate func isStoreURL(_ url: URL) -> Bool {
if url.scheme == "http" || url.scheme == "https" {
if url.host == "itunes.apple.com" {
if url.host == "itunes.apple.com" || url.host == "apps.apple.com" {
return true
}
}
if url.scheme == "itms-appss" || url.scheme == "itmss" {
if url.scheme == "itms-appss" || url.scheme == "itms-apps" || url.scheme == "itmss" {
return true
}
return false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,11 +512,11 @@ extension PlaylistWebLoader: WKNavigationDelegate {
// leave a 'Back to Safari' button in the status bar, which we do not want.
fileprivate func isStoreURL(_ url: URL) -> Bool {
if url.scheme == "http" || url.scheme == "https" {
if url.host == "itunes.apple.com" {
if url.host == "itunes.apple.com" || url.host == "apps.apple.com" {
return true
}
}
if url.scheme == "itms-appss" || url.scheme == "itmss" {
if url.scheme == "itms-appss" || url.scheme == "itms-apps" || url.scheme == "itmss" {
return true
}
return false
Expand Down

0 comments on commit c13f3d4

Please sign in to comment.