Google Redirect Remover

A very simple Google redirect remove

目前为 2022-02-15 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Google Redirect Remover
  3. // @description A very simple Google redirect remove
  4. // @version 2.8.17012102
  5. // @author DanoR
  6. // @namespace http://weibo.com/zheung
  7. // @grant none
  8. // @include *://www.google.*/*
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. console.log('Remover working!');
  13.  
  14. const ws = ['irc_mil', '_Epb.irc_tas', 'irc_hl.irc_hol', 'irc_vpl.irc_but', 'irc_fsl.irc_but'];
  15.  
  16. setInterval(function() {
  17. const allH3rA = document.querySelectorAll('h3.r>a');
  18.  
  19. for(let i = 0; i < allH3rA.length; i++)
  20. allH3rA[i].removeAttribute('onmousedown');
  21.  
  22. for(let i = 0; i < ws.length; i++) {
  23. const allIrc = document.querySelectorAll('a.' + ws[i]);
  24.  
  25. for(let j = 0; j < allIrc.length; j++) {
  26. delete allIrc[j].__jsaction;
  27. allIrc[j].removeAttribute('jsaction');
  28. }
  29.  
  30. }
  31. }, 1024);
  32. })();