Greasy Fork is available in English.

YouTube - Search Results Cleaner

Hides most of the random, unrelated videos which YouTube injects into search results, but still allows you to access them. This script gathers videos from categories like "People also watched" and "For you" and collapses them into thin boxes on-screen so they won't distract from actual search results. Hover the mouse over these boxes to show their contents.

< Feedback on YouTube - Search Results Cleaner

Review: Good - script works

Posted: 04-12-2022

Could you add a match pattern to the script, so it only loads for YouTube?

Something like

//    @match    *://*.youtube.tld/*

That would match any version of the YouTube site but would keep it from running anywhere else.

Posted: 06-12-2022

This is a stylesheet written in CSS, known as a UserStyle. It's not the same as a UserScript written in JavaScript. It's meant to be used with the Stylus extension. If GreasyFork is not adding a @match rule when converting CSS into JavaScript, then that's something they should consider doing. I'm actually surprised to hear they don't do that already. Anyway, you're just not going to find many people using @match in CSS code, because that functionality is supposed to be handled with the @-moz-document rule, as shown in line 16 of this stylesheet.

Posted: 09-12-2022

I let the admin of Greasyfork know that this is happening, btw. I think it might have something to do with how there's a separate comment block above the CSS. Maybe that is somehow tripping up the site's conversion tool. Anyway, thanks for letting me know something weird is going on.

Posted: 15-12-2022

Okay Greasemonkey has been fixed so that the Javascript converter now supports multi-line comment blocks at the top like this script has. Thanks again for bringing it up.

Post reply

Sign in to post a reply.