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

Shorts still visible on recommended section (Firefox). #30

Open giannilabella opened 1 year ago

giannilabella commented 1 year ago

I think this feature was added relatively recently, and so I thought a solution for it wasn't implemented yet. Screenshot 2023-05-01 161753

But quickly looking through the code, I found a difference between the src and src_fx (that I suppose is for Firefox) folders, there's a difference on the function responsible for removing the shorts. Running this piece of code that seems to be missing from the removeShortVideo in the src_fx folder worked.

    let reels=document.querySelectorAll("ytd-reel-shelf-renderer, ytm-reel-shelf-renderer");
    if(reels.length!=0){
        for(let reel of reels){
            reel.remove();
        }
        logf("A shorts reels has blocked.");
    }

I don't know if it was left like that on purpose, because 'src' folder is in version 1.4.0 and 'src_fx' in version 1.3.4, or by mistake. Anyway, I would like to fix it, but I'm quite on an urge due to university exams, so if I have time late in the week I will try working in it. Writing this issue so the problem is documented.