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

Commit

Permalink
Checking domain instead of url subscript for determining If it is a m…
Browse files Browse the repository at this point in the history
…ediasite
  • Loading branch information
soner-yuksel committed Dec 16, 2020
1 parent 690f5f4 commit 5f97e02
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,9 @@ extension BrowserViewController {
// Step 2: Load a video on a streaming site
guard !notificationShown else { return }

let isVideoStreamingSite = (selectedTab.canonicalURL?.absoluteString.contains("youtube") == true
|| selectedTab.canonicalURL?.absoluteString.contains("vimeo") == true)

if isProductNotificationsValid,
!Preferences.ProductNotificationBenchmarks.videoAdBlockShown.value,
isVideoStreamingSite {
selectedTab.url?.isMediaSiteURL == true {

notifyVideoAdsBlocked(theme: Theme.of(selectedTab))
notificationShown = true
Expand Down

0 comments on commit 5f97e02

Please # to comment.