Raw Source
michelleplur / New Userscript

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @include  /^https?://www.demorgen\.be*/
// @description  try to take over the world!
// @author       You
// @icon         https://www.google.com/s2/favicons?sz=64&domain=demorgen.be
// @grant    GM_addStyle
// @updateURL   https://gist.githubusercontent.com/michelleplur/7cf1f18f3087c1d3d722b2cb38493dbb/raw/c7488a476820b119f2f753d77cfd0e38370aae7d/removepaywall.js
// @license 0BSD

// ==/UserScript==

function addGlobalStyle(css) {
  var head, style;
  head = document.getElementsByTagName('head')[0];
  if (!head) {
    return;
  }
  style = document.createElement('style');
  style.type = 'text/css';
  style.innerHTML = css;
  head.appendChild(style);
}

function removePaywall() {
  console.log('removing paywall');
  document.querySelector('html').classList.remove('js-tm-overflow-scroll-active');
  document.querySelector('html').classList.remove('js-tm-backdrop-active');
  //document.querySelector("tm-overflow-scroll__space").remove()
  document.querySelector('body').classList.remove('js-tm-backdrop-active')
  document.querySelector('.tm-backdrop').remove()
  document.querySelector('.tm-overflow-scroll__space').remove()
  document.querySelector('.artstyle__advertisement').remove()
  document.querySelector('.artstyle__text')
  addGlobalStyle('.artstyle__text { display: block !important; }');
  document.getElementById('IN_ARTICLE_PURCHASE_ANON_USER').remove()

}
window.addEventListener('load', function () {
  // your code here
  removePaywall()
}, false);