code-charity / youtube

[top~1 open YouTube & Video browser-extension] - Enrich your experience & choice! 🧰180+ options & clever features 📌set+forget📌Longest-standing(been tough). Please join🧩us👨‍👩‍👧‍👧 ..⋮ {playback|content discovery|player|extra buttons|distractions|related videos|shorts|ads|quality|codec|full tab|full screen}
http://improvedtube.com
Other
3.51k stars 527 forks source link

Remove useless search results #957

Closed chirag127 closed 2 years ago

chirag127 commented 3 years ago

Description : Just like remove related search results option also provide option to remove People also watched,Learn while you're at home,Watch again(only come if you already watched some videos related to the search query ),For you,Top news search results and more preferably also provide option to remove all useless search remove as it might be annoying for anyone to enable all the option one by one .

Issue URL (example) : https://www.youtube.com/results?search_query=russia

Screenshots: ![image](https://user-images.githubusercontent.com/76880977/123502498-85869800-d66a-11eb-9769-75cfcc60446a.png) ![image](https://user-images.githubusercontent.com/76880977/123502417-d944b180-d669-11eb-9c07-59f4af84e657.png) ![image](https://user-images.githubusercontent.com/76880977/123502420-d9dd4800-d669-11eb-82b6-f9e2310ffd2e.png) ![image](https://user-images.githubusercontent.com/76880977/123502419-d944b180-d669-11eb-8903-be5a8dfb77c5.png) ![image](https://user-images.githubusercontent.com/76880977/123502421-da75de80-d669-11eb-98e9-0e2703969d0b.png)

ImprovedTube commented 3 years ago

we can add it here
https://github.com/code4charity/YouTube-Extension/blob/585957d46d79e6606b650fb1d48fdaec2a5f9e01/content-styles.css#L200

each box is //*[@id="dismissible"]
identified only by the content of a <span id="title"> /html/body/ytd-app/div/ytd-page-manager/ytd-search/div[1]/ytd-two-column-search-results-renderer/div/ytd-section-list-renderer/div[2]/ytd-item-section-renderer/div[3]/ytd-shelf-renderer[2]/div[1]/div[1]/div/h2/span

ImprovedTube commented 3 years ago

we can also make thumbnails smaller, as they force a lot of blank space & scrolling.

and move all the "dismissible"'s into a "secondary" column,
(search results are div id="columns" > div id="primary", while youtube's css also knows "secondary" from video pages...)

948

chirag127 commented 3 years ago

By the way , dismissible Id is used by all videos. No results when I block dismissible Id elements.

ImprovedTube commented 3 years ago

dismissible {display:none;}

? (on youtube.com/results?search_query)

ImprovedTube commented 3 years ago

why close?

allanlaal commented 2 years ago

the solutions stated above do not work

my current solution is to use uBlock (Origin ofc) with these rules for yt search:

  ##ytd-shelf-renderer.ytd-item-section-renderer.style-scope > .ytd-shelf-renderer.style-scope:has-text(People also watched)

  ##ytd-shelf-renderer.ytd-item-section-renderer.style-scope > .ytd-shelf-renderer.style-scope:has-text(For you)

  ##ytd-shelf-renderer.ytd-item-section-renderer.style-scope > .ytd-shelf-renderer.style-scope:has-text(Previously watched)

imho there is no good reason why code4charity/YouTube-Extension should do content blocking, when there is a popular content blockin plugin installed by most powerusers ;)

chirag127 commented 2 years ago

the solutions state above do not work

my current solution is to use uBlock with these rules for yt search:

  ##ytd-shelf-renderer.ytd-item-section-renderer.style-scope > .ytd-shelf-renderer.style-scope:has-text(People also watched)

  ##ytd-shelf-renderer.ytd-item-section-renderer.style-scope > .ytd-shelf-renderer.style-scope:has-text(For you)

  ##ytd-shelf-renderer.ytd-item-section-renderer.style-scope > .ytd-shelf-renderer.style-scope:has-text(Previously watched)

imho there is no good reason why code4charity/YouTube-Extension should do content blocking, when there is a popular content blockin plugin installed by most powerusers ;)

Well menifest v3 is going to become compulsory soon and the has-text rules will be off no use.

allanlaal commented 2 years ago

luckily that only applies to Chrome and its derivates as of 2023-01-01 Firefox should be fine

chirag127 commented 2 years ago

By the way, I have a better solution of the issue. Instead of removing these too many sections what we can do is that select video in type in filters . But with expense of no playlist , no channel . By the way I'm fine with that. Or maybe I should make a another feature requests for to make one of the filters default.

allanlaal commented 2 years ago

I changed my mind. I think its better if code-for-charity/YouTube-Extension is a one-click solution to fix all youtubes shitty behaviour

code for solution: https://greasyfork.org/en/scripts/441189-youtube-hide-for-you-suggestion-when-search