Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netflix.com #135052

Merged
merged 10 commits into from
Nov 25, 2022
Merged

netflix.com #135052

merged 10 commits into from
Nov 25, 2022

Conversation

piquark6046
Copy link
Member

Prerequisites

To avoid invalid pull requests, please check and confirm following terms

  • This is not an ad/bug report;
  • My code follows the guidelines and syntax of this project;
  • I have performed a self-review of my own changes;
  • My changes do not break web sites, apps and files structure.

What problem does the pull request fix?

If the problem does not fall under any category that is listed here, please write a comment below in corresponding section

  • Missed ads or ad leftovers;
  • Website or app doesn't work properly;
  • AdGuard gets detected on a website;
  • Missed analytics or tracker;
  • Social media buttons — share, like, tweet, etc;
  • Annoyances — pop-ups, cookie warnings, etc;
  • Filters maintenance.

What issue is being fixed?

Enter the issue address

None.

Add your comment and screenshots

Netflix Ad-supported plan

Terms

  • By submitting this issue, I agree that pull request does not contain private info and all conditions are met

@piquark6046
Copy link
Member Author

piquark6046 commented Nov 23, 2022

(() => {
  var ReplaceMap = {adBreaks: [], adState: null, currentAdBreak: 'undefined'}
  Object.defineProperty = new Proxy(Object.defineProperty,
    {
      apply: (target, thisArg, ArgsList) =>
      {
        var Original = Reflect.apply(target, thisArg, ArgsList)
        if (ArgsList[1] == 'getAdBreaks' || ArgsList[1] == 'getAdsDisplayStringParams')
        {
          return Original[ArgsList[1]] = function() {}
        }
        else if (ArgsList[1] == 'adBreaks' || ArgsList[1] == 'currentAdBreak' || typeof Original['adBreaks'] !== 'undefined')
        {
          for (var [key, value] of Object.entries(Original))
          {
            if (typeof ReplaceMap[key] !== 'undefined' && ReplaceMap[key] !== 'undefined')
            {
              Original[key] = ReplaceMap[key]
            }
            else if (typeof ReplaceMap[key] !== 'undefined' && ReplaceMap[key] === 'undefined')
            {
              Original[key] = undefined
            }
          }
          return Original
        }
        else
        {
          return Original
        }
      }
    })
})();

@piquark6046 piquark6046 marked this pull request as ready for review November 23, 2022 13:55
@piquark6046 piquark6046 requested a review from a team November 23, 2022 13:55
@Alex-302 Alex-302 added the A: In progress Work on the issue is in progress label Nov 25, 2022
@Alex-302 Alex-302 merged commit 235962f into AdguardTeam:master Nov 25, 2022
@piquark6046 piquark6046 mentioned this pull request Nov 25, 2022
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: In progress Work on the issue is in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants