Advertisement
Guest User

Untitled

a guest
Feb 19th, 2020
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Gratis Premium Krant
  3. // @version     1
  4. // @grant       none
  5. // @author.     Daniel
  6. // @include     https://www.ad.nl/*
  7. // @include     https://www.bd.nl/*
  8. // @include     https://www.ed.nl/*
  9. // @include     https://www.tubantia.nl/*
  10. // @include     https://www.bndestem.nl/*
  11. // @include     https://www.pzc.nl/*
  12. // @include     https://www.destentor.nl/*
  13. // @include     https://www.gelderlander.nl/*
  14. // @include     https://www.nrc.nl/*
  15. // @include     https://www.trouw.nl/*
  16. // ==/UserScript==
  17.  
  18. (function (){
  19.     var domain = window.location.host.replace('www.','');
  20.     switch(domain){
  21.         case 'nrc.nl':
  22.             document.cookie = 'counter=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
  23.             break;
  24.         case 'trouw.nl':
  25.             document.cookie = 'TROUW_TID=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
  26.             removeByClass('paywall-notice');
  27.             break;
  28.         default:
  29.             document.cookie = 'temptationTrackingId=; domain=.' + domain + '; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
  30.             removeByClass('paywall-content-message');
  31.             break;
  32.     }
  33. })();
  34.  
  35. function removeByClass(_class){
  36.     window.addEventListener('load', function(){
  37.         document.querySelectorAll('.' + _class)[0].remove();
  38.     }, false);
  39. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement