doma-itachi / Youtube-shorts-block

Play the Youtube shorts video as if it were a normal video
https://chrome.google.com/webstore/detail/youtube-shorts-block/jiaopdjbehhjgokpphdfgmapkobbnmjp
MIT License
233 stars 19 forks source link

New Subscriptions page seems to break the addon #33

Closed bertvandepoel closed 1 year ago

bertvandepoel commented 1 year ago

It seems YouTube has a new Subscriptions page (or is testing on me). I now see bigger thumbnails and shorts seem to escape the marvellous addon you've created. Screenshot at 2023-05-16 00-20-18

I'm not sure if this is a universal issue or I'm just getting some A/B testing done by YouTube/Google, but if I can help test something, please let me know!

doma-itachi commented 1 year ago

hmmm... It appears to be probably the latter. I have confirmed that the block works correctly in both Chromium and Firefox versions. (Screenshot below) However, the behavior may be different between Japanese Youtube and overseas Youtube.

image image

If you can show us the HTML of the surrounding area, we may be able to solve the problem. image

bertvandepoel commented 1 year ago

Oh yeah, it seems your subscriptions page is still looking like the "old" look. I hope they decide they don't need to keep this new layout. In my opinion it isn't very efficient. I would rather go back to the layout you have :)

Does this screenshot help or do you need more HTML context than that? Screenshot at 2023-05-21 12-49-05

doma-itachi commented 1 year ago

Thanks!! I tried to fix it with a simple code, but does it work? Youtube-shorts_block_v140.zip

( To run the zipped add-on, please refer to the following page ) https://extensionworkshop.com/documentation/develop/temporary-installation-in-firefox/

bertvandepoel commented 1 year ago

I'm afraid that doesn't seem to work (I made sure to disable the existing addon before loading the temporary one). I included a new source view screenshot just in case they maybe changed something! Screenshot at 2023-05-26 18-26-50

Let me know if you need any further info :)

gvirta commented 1 year ago

I got the YT update a couple days ago and have been suffering with a shorts-laden subscription page all weekend. I'd love to make it go away like the before times. Anything I can do to help make this a reality I am willing to do up to and including providing dev console info and screenshots and possibly QA duties ๐Ÿ˜

MAKE IT STOP

elliotcm commented 1 year ago

Hello all. I've also been served up this A/B test.

@doma-itachi Here is a patch to the code in your attached zip file which fixes this issue for me:

diff --git a/src/main.js b/src/main.js
index 8e9c825..fca9102 100644
--- a/src/main.js
+++ b/src/main.js
@@ -172,6 +172,13 @@ function removeShortVideo(){
     }
     del();

+    // Remove new-style shorts on subscriptions page
+    document.querySelectorAll("ytd-rich-item-renderer").forEach(element => {
+        if (element.querySelector("span[aria-label='Shorts']")) {
+            element.remove();
+        }
+    });
+
     //ใ‚ทใƒงใƒผใƒˆ้–ข้€ฃใฎใƒชใƒผใƒซใ‚’้ž่กจ็คบใซใ™ใ‚‹
     let reels=document.querySelectorAll("ytd-reel-shelf-renderer, ytm-reel-shelf-renderer");
     if(reels.length!=0){

Please make use of it as you wish :) Hopefully it helps others too.

It still leaves us with blank spots in the grid since Youtube in their wisdom are putting each row in a wrapper element like we're doing tables again.

doma-itachi commented 1 year ago

@elliotcm Thanks godness...!! @bertvandepoel @gvirta I have attached fixed zip(for firefox). Does it work correctly? Youtube-shorts_block_v140.zip

gvirta commented 1 year ago

@doma-itachi it is definitely blocking the shorts on the subscription page in Firefox; thank you to you and @elliotcm! I can confirm that the shorts leave an empty hole in the layout where they would normally be, but that is a huge improvement over the shorts-filled hole that they used to occupy.

doma-itachi commented 1 year ago

Currently, the new layout is not applied to Youtube in Japan. I tried to debug the new layout using regional settings, VPN, etc. to fix the blank issue, but could not change the layout in any way. Therefore, I am going to submit the code as it is once and for all. If anyone can fix it, please send me a pull request.

elliotcm commented 1 year ago

Fixing that would require shifting all the other videos around between row wrappers. Doable, but seems like more effort than a quick fix.

On Wed, 7 Jun 2023 at 08:09, ๅœŸ้–“ใ„ใŸใก @.***> wrote:

Currently, the new layout is not applied to Youtube in Japan. I tried to debug the new layout using regional settings, VPN, etc. to fix the blank issue, but could not change the layout in any way. Therefore, I am going to submit the code as it is once and for all. If anyone can fix it, please send me a pull request.

โ€” Reply to this email directly, view it on GitHub https://github.com/doma-itachi/Youtube-shorts-block/issues/33#issuecomment-1580065119, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2VKJ3VGONHFC3SMTYM4TXKASLFANCNFSM6AAAAAAYCZVCNE . You are receiving this because you were mentioned.Message ID: @.***>

bertvandepoel commented 1 year ago

I can confirm that this works very well. I hope it will land on AMO (addons.mozilla.org) soon! If someone wants to add some javascript to readjust the rows that would be even better of course, but this is already great :)

OshidaBCF commented 1 year ago

Fixing that would require shifting all the other videos around between row wrappers. Doable, but seems like more effort than a quick fix.

it isn't a simple "list" of video that automatically wrap around the screen ?

elliotcm commented 1 year ago

That would be the sensible way to do it, but no they have row elements with 3 videos in each. I assume so they can do things like insert rows of shorts or rows of other random garbage easily.

On Fri, 9 Jun 2023 at 08:44, OshidaBCF @.***> wrote:

Fixing that would require shifting all the other videos around between row wrappers. Doable, but seems like more effort than a quick fix. โ€ฆ <#m1029565590084902101> On Wed, 7 Jun 2023 at 08:09, ๅœŸ้–“ใ„ใŸใก @.> wrote: Currently, the new layout is not applied to Youtube in Japan. I tried to debug the new layout using regional settings, VPN, etc. to fix the blank issue, but could not change the layout in any way. Therefore, I am going to submit the code as it is once and for all. If anyone can fix it, please send me a pull request. โ€” Reply to this email directly, view it on GitHub <#33 (comment) https://github.com/doma-itachi/Youtube-shorts-block/issues/33#issuecomment-1580065119>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2VKJ3VGONHFC3SMTYM4TXKASLFANCNFSM6AAAAAAYCZVCNE https://github.com/notifications/unsubscribe-auth/AAA2VKJ3VGONHFC3SMTYM4TXKASLFANCNFSM6AAAAAAYCZVCNE . You are receiving this because you were mentioned.Message ID: @.>

it isn't a simple "list" of video that automatically wrap around the screen ?

โ€” Reply to this email directly, view it on GitHub https://github.com/doma-itachi/Youtube-shorts-block/issues/33#issuecomment-1584122808, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAA2VKLJTYRMUSABOKDH323XKLH6JANCNFSM6AAAAAAYCZVCNE . You are receiving this because you were mentioned.Message ID: @.***>

elliotcm commented 1 year ago

Here's a row with a short removed, you can see the row elements are custom ytd-rich-grid-row elments:

Screenshot 2023-06-09 at 08 57 13

Also how ridiculously big the thumbnails now are. Can only just fit two rows on a 13" screen.

OshidaBCF commented 1 year ago

Yeah i noticed that the rows are "dynamic".

The only possible fix would be that your script hide the list, and show a custom one with only videos, that's annoying.

bertvandepoel commented 1 year ago

Oh you guys see 3 videos in a row? For me it's 4. I agree the thumbnails are waaaaaay too large. I'm hoping that someone makes an addon that makes them smaller. I want to be able to see 16 or 20 thumbnails at the same time at least on my 1920x1200 27 inch (I think) screens. Right now I'm just doing way too much scrolling. But I'm already really happy that we can hide the Shorts :)

OshidaBCF commented 1 year ago

it was completely fine yesterday for me, but i guess they updated the layout overnight and now i hate it

For me i have 4 vids per row, but if i hide the shots i have 2 or 3 video only, and it's wayyyy to big

google why

bertvandepoel commented 1 year ago

The update has landed on AMO and my browser has updated. Thank you very much @doma-itachi :D

I'm closing this issue for now. If someone wants to work on the videos per row issue (please do!) then I suggest they maybe file another issue and a PR, that's probably cleaner. Thanks for helping everyone!