amitbl / blocktube

YouTube™ content blocker
GNU General Public License v3.0
856 stars 59 forks source link

How do I access the list of blocked channel IDs in an Advanced Blocking function? #362

Open DFalzoneUNO opened 5 months ago

DFalzoneUNO commented 5 months ago

I'm writing the following function to block playlists from my blocked channels:

(video, objectType) => {
  // Add custom conditions below
  if (objectType == "playlistRenderer") {
     console.log(`blocktube saw this channel id on a playlist\n${video.channelId}`);
  }

  // Custom conditions did not match, do not block
  return false;
}

I'd like to replace that console.log call with something that blocks the object if video.channelId is in my blocklist, but I don't know how to get the blocklist as it is not an argument to the function.