Remove Novelpia Viewer Ads

Safari Content blocker is meh

As of 2022-07-22. See the latest version.

// ==UserScript==
// @name        Remove Novelpia Viewer Ads
// @namespace   Novelpia.com
// @match       https://novelpia.com/viewer/*
// @grant       none
// @version     1.0.3
// @author      -
// @description Safari Content blocker is meh
// @license     MIT
// ==/UserScript==

// wait a page load a bit
setTimeout(() => {
  // block function
  let _____blockfunc = () => {
    // Coin payback
    ['#novel_drawing a[href="/coin_shop"]', '#novel_drawing_page a[href="/coin_shop"]'].forEach(s => {
      document.querySelectorAll(s).forEach(e => {
        e.parentNode.remove()
      });
    });
  };
  
  // run function.
  _____blockfunc();

  // tons of shit makes set interval. fuck
  setInterval(_____blockfunc, 1000);
}, 500);