-
Notifications
You must be signed in to change notification settings - Fork 440
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, left small comments.
let isPrivateBrowsing = PrivateBrowsingManager.shared.isPrivateBrowsing | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment referencing the ticket we are fixing?
I think we should use this old ticket for it
#511
let isPrivateBrowsing = PrivateBrowsingManager.shared.isPrivateBrowsing | ||
|
||
if url.baseDomain == "youtube.com" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the WKNavDelegate getting bigger and bigger :(
Nothing to do now, but if we add another site specific hack for adblocking we should abstract it somewhere, maybe in Tab or in userScriptManager itself
Unblocking this, turns out the script works well, no more adjustments are needed. |
c279ad8
to
bb984ae
Compare
bb984ae
to
d3ff3e0
Compare
Summary of Changes
Added Javascript injection into the
MainFrame
only (same as Desktop).. to block youtube ads. The JS is injected into EVERY page and not just the youtube domain which can come in multiple forms:youtube.com
,youtu.be
, etc..If we want it only on youtube domain, we can add it whenever. Just let me know.
This pull request fixes #511
Submitter Checklist:
NSLocalizableString()
Test Plan:
Screenshots:
Reviewer Checklist:
QA/(Yes|No)
release-notes/(include|exclude)
bug
/enhancement