Blocking Ads on Funimation

Well, I finally got sick of seeing the same National Grid commercial on Funimation for the one-thousandth time so I’ve come up with a strategy for blocking ads on their site.

You’ll need the following chrome plugin to get this to work correct:

  1. Custom JavaScript for websites to inject custom javascript into the loading page.

Funimation will load a blockadblock.js file when it detects adblockplus which will place four black overlay divs over the video content.

At first, I attempted to block the blockadblock.js http get request, but the other funimation javascript code depends on it.

What we’ll do instead is to load a timer that looks specifically for those div elements and will remove them from the page.

Code Snippet and Example

Javascript

// Create interval to repeatedly remove 'funimation-error-screen' every half second.
setInterval(function(){ $("funimation-error-screen").remove() }, 500);

CJS Settings

image

The plugin should load this javascript before the page loads and will eliminate the black overlay when they pop up.

Pretty simple solution for what was looking like a complex problem.

Hopefully this helps!

**Edit: It appears that loading JQuery onto the page blocks the Pause button.

You can do the same with Vanilla javascript using the following code:

// Create interval to repeatedly remove 'funimation-error-screen' every half second.
var timer = window.setInterval(function(){
  var elem = document.getElementById("funimation-error-screen");
  if(elem === null) return;
  elem.parentNode.removeChild(elem);
},100);