Google Redirect Remover

A very simple Google redirect remove

当前为 2017-01-21 提交的版本,查看 最新版本

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