Blocking YouTube pages or videos
Blocking YouTube pages or videos
I'm attempting to write a filter subscription that blocks certain YouTube videos and having a bit of trouble with my rules
Given random video:
http://youtube.com/watch?v=f2RzgyvgjBM
I attempted rules like
youtube.com/watch?v=f2RzgyvgjBM
youtube.com/watch?v=f2RzgyvgjBM#body
youtube.com/watch?v=f2RzgyvgjBM#object
...but couldn't get anything to fly -- are the query vars messing with it? I know the object is added by Javascript on the page, but blocking the whole body would be fine
I know the actual video URLs are youtube.com/v/f2RzgyvgjBM which I could block with some fanangling, but I'm trying to avoid that -- just copy & paste the URL to block
Given random video:
http://youtube.com/watch?v=f2RzgyvgjBM
I attempted rules like
youtube.com/watch?v=f2RzgyvgjBM
youtube.com/watch?v=f2RzgyvgjBM#body
youtube.com/watch?v=f2RzgyvgjBM#object
...but couldn't get anything to fly -- are the query vars messing with it? I know the object is added by Javascript on the page, but blocking the whole body would be fine
I know the actual video URLs are youtube.com/v/f2RzgyvgjBM which I could block with some fanangling, but I'm trying to avoid that -- just copy & paste the URL to block
Adblock Plus never prevents you from going to a web page, it will only block objects embedded in this web page. You probably want to look at the BlockSite extension (http://adblockplus.org/en/faq_features#siteblock).
You can block that video with this:
... the player will start, but that video will not play.
You can find that same line in every video on youtube ... just replace the last part with the correct video id (that item is in the "blockable items" list or you can replace the id from the page title).
If you are REALLY trying to annoy someone, you can block ALL videos with:
... or just hide all of youtube with:

Code: Select all
youtube.com/get_video?video_id=f2RzgyvgjBM
You can find that same line in every video on youtube ... just replace the last part with the correct video id (that item is in the "blockable items" list or you can replace the id from the page title).
If you are REALLY trying to annoy someone, you can block ALL videos with:
Code: Select all
youtube.com/get_video?video_id=
Code: Select all
youtube.com#body

Because with element-hiding rules, you can only block domains or subdomains ... you cannot use specific pages or specify subdirectories. Only:jamiew wrote: Any ideas why:doesn't work? The queryvars?Code: Select all
youtube.com/watch?v=f2RzgyvgjBM#body
Code: Select all
youtube.com#body
Now I'm not EXACTLY sure what you are trying to do. I would think that the rule for that youtube video would work on ANY domain seeing that it still should be that same 'request' on other sites.jamiew wrote:.... I was hoping to make this work generally beyond just YouTube

EDIT:
For a specific video id from there, just the video_id number and the ABP '$type' should work fine:
Code: Select all
f2RzgyvgjBM$other
Thanks for the help guys! The fruits of your advice:
http://rickrolldb.com/
User-submitted/vetted URLs produce a ABP filter subscription for blocking the dreaded rickroll! NEVER AGAIN! NEVER FORGET!
Still in very early testing & development, but wanted to put it out there before I go on holiday -- any feedback much appreciated!
http://rickrolldb.com/
User-submitted/vetted URLs produce a ABP filter subscription for blocking the dreaded rickroll! NEVER AGAIN! NEVER FORGET!
Still in very early testing & development, but wanted to put it out there before I go on holiday -- any feedback much appreciated!