Advertisement
Guest User

Untitled

a guest
Feb 20th, 2020
333
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name        Gratis Premium Krant
  3. // @author      Daniel
  4. // @version     0.1.2
  5. // @grant       none
  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. // @include     https://www.speld.nl/*
  17. // @include     https://www.volkskrant.nl/*
  18. // ==/UserScript==
  19.  
  20. (function (){
  21.     var domain = window.location.host.replace('www.','');
  22.     switch(domain){
  23.         case 'nrc.nl':
  24.             document.cookie = 'counter=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
  25.             break;
  26.         case 'trouw.nl':
  27.             document.cookie = 'TROUW_TID=; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
  28.             removeByClass('paywall-notice');
  29.             break;
  30.         case 'speld.nl':
  31.             document.cookie = 'speld-paywall; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
  32.             removeByClass('speld-paywall');
  33.             break;
  34.         case 'volkskrant.nl':
  35.             document.cookie = 'TID_ID=; path=/; expires=Thus, 01 Jan 1970 00:00:01 GMT;';
  36.             removeByClass('paywall-notice');
  37.             break;
  38.         default:
  39.             document.cookie = 'temptationTrackingId=; domain=.' + domain + '; path=/; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
  40.             removeByClass('paywall-content-message');
  41.             break;
  42.     }
  43. })();
  44.  
  45. function removeByClass(_class){
  46.     window.addEventListener('load', function(){
  47.         document.querySelectorAll('.' + _class)[0].remove();
  48.     }, false);
  49. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement