Blocker for Autosurf

Prevents autosurf websites from opening websites specified (by you) in blocklist

  1. // ==UserScript==
  2. // @name Blocker for Autosurf
  3. // @description Prevents autosurf websites from opening websites specified (by you) in blocklist
  4. // @license MIT
  5. // @version 1
  6. // @include *
  7. // @grant GM_setValue
  8. // @namespace https://greasyfork.org/users/310316
  9. // ==/UserScript==
  10.  
  11. blocklist = ["tadbirmail.ir", "qodsna.com", "eheyat.com", "www.mersadnews.ir", "sbnews.ir", "fater24.com", "eheyat.com", "salehintehran.ir", "www.mazandrooz.ir", "qodsna.com", "sorooshekhabar.ir", "ofoghetaze.com", "sorooshnews.com", "uromnews.ir", "www.sorooshekhabar.ir", "q27.ir", "goftarname.ir", "shabestan.ir", "tadbiretazenews.com", "usfacts.ir"];
  12.  
  13. for (var i = 0; i < blocklist.length; i++) {
  14. if (document.body.textContent.indexOf(blocklist[i]) != -1) {
  15. unsafeWindow.open = function () {
  16. return null;
  17. };
  18. console.log("********blocked***********");
  19. }
  20.  
  21. }