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

remove sponsored tiles from horizontal shelf #100

Merged
merged 1 commit into from
Dec 3, 2023

Conversation

alyyousuf7
Copy link

@alyyousuf7 alyyousuf7 commented Oct 25, 2023

If you open up YouTube TV with a specific User-Agent (which my LG TV has), it shows sponsored tile like this:

Home Page

image ### Search Result image
User-Agent: Mozilla/5.0 (Linux; NetCast: U) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/87.0.3954.79 Safari/537.36 SmartTV/10.0 Colt/2.0

I tried with a couple of other user-agents from this source, and it didn't show me this sponsored tile, but I always got it with the above user-agent.

The fix is simple - look for adSlotRenderer key, and remove it while parsing JSON.

@alyyousuf7 alyyousuf7 force-pushed the remove-ad-tiles branch 2 times, most recently from b1f1de5 to 8ba6380 Compare October 25, 2023 06:54
@fire332
Copy link
Collaborator

fire332 commented Oct 25, 2023

May I suggest moving the changes related to dev UX to a separate PR? There's a few more related changes that I had in mind. Namely updating dependencies and using --mode production flag by default when calling webpack.

@alyyousuf7
Copy link
Author

alyyousuf7 commented Oct 25, 2023

May I suggest moving the changes related to dev UX to a separate PR? There's a few more related changes that I had in mind. Namely updating dependencies and using --mode production flag by default when calling webpack.

By dev UX, do you mean the .gitignore and husky related changes?

UPDATE: Removed everything unrelated to the title of the PR.
UPDATE2: created a separate PR for dev ux

@alyyousuf7
Copy link
Author

I just realized that the same sponsored tile also appears in search result - i have pushed another commit to fix that as well

@throwaway96
Copy link
Member

Have you tested this? If so, on what webOS version?

@alyyousuf7
Copy link
Author

Have you tested this? If so, on what webOS version?

Yes, I tested it on this device:
User-Agent: LG Browser/8.00.00 (webOS.TV-2022), _TV_O18/03.33.80 (LG, 55UQ7590PUB, wireless)

@throwaway96 throwaway96 merged commit 72eb528 into webosbrew:main Dec 3, 2023
1 check passed
@igorkulman
Copy link

I build and deploy the app after this PR got fixed and I still see the sponsored tile on my LG WebOS 3 TV

@alyyousuf7
Copy link
Author

I have started seeing them again as well. I think YouTube responses have changed overtime.

@jnewc
Copy link

jnewc commented Jan 9, 2024

If you have more than one account it can also appear for one but not the other

@alyyousuf7
Copy link
Author

I'll dig into this more and raise another PR - it might not be that YouTube changed their response, but it is possible that I missed some of the cases.

@jospezial
Copy link

Could parts of #93 help to block that tile again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants