eBonus.gg MoreCAPTCHA

Acelera a solução dos desafios do reCAPTCHA do Google reduzindo os efeitos de transição e fornecendo capacidade de seleção contínua.

  1. // ==UserScript==
  2. // @name eBonus.gg MoreCAPTCHA
  3. // @namespace https://eugenox.appspot.com/
  4. // @description Acelera a solução dos desafios do reCAPTCHA do Google reduzindo os efeitos de transição e fornecendo capacidade de seleção contínua.
  5. // @version 1.1
  6. // @author YTGustavinho
  7. // @license GNU General Public License
  8. // @include https://www.google.com/recaptcha/api2/bframe?*
  9. // @run-at document-start
  10. // @grant unsafeWindow
  11. // @homepageURL https://eugenox.appspot.com/script/morecaptcha
  12. // ==/UserScript==
  13.  
  14. // Copyright (C) 2017 Eugene Nouvellieu <eugenox_gmail_com>
  15. //
  16. // This program is free software: you can redistribute it and/or modify
  17. // it under the terms of the GNU General Public License as published by
  18. // the Free Software Foundation, either version 3 of the License, or
  19. // (at your option) any later version.
  20. //
  21. // This program is distributed in the hope that it will be useful,
  22. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  23. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  24. // GNU General Public License for more details.
  25. //
  26. // You should have received a copy of the GNU General Public License
  27. // along with this program. If not, see <http://www.gnu.org/licenses/>.
  28.  
  29. var SPEED = 5;
  30.  
  31. var selector = {
  32. selecting: undefined,
  33.  
  34. handle: function(event) {
  35. var tiles = new Set(document.querySelectorAll('#rc-imageselect td')), tile = event.target;
  36.  
  37. while (tile && ! tiles.has(tile)) {
  38. tile = tile.parentNode;
  39. }
  40.  
  41. if (tile) {
  42. event.stopPropagation();
  43. event.preventDefault();
  44.  
  45. var selected = 'selected' in tile.dataset && tile.dataset.selected == 'true';
  46.  
  47. if (this[event.type](selected)) {
  48. tile.dataset.selected = this.selecting;
  49.  
  50. tile.firstElementChild.click();
  51. }
  52. }
  53. },
  54.  
  55. mouseover: function(selected) {
  56. return ! (this.selecting === undefined || this.selecting === selected);
  57. },
  58.  
  59. mousedown: function(selected) {
  60. this.selecting = ! selected;
  61.  
  62. return true;
  63. },
  64.  
  65. mouseup: function(selected) {
  66. this.selecting = undefined;
  67.  
  68. return false;
  69. }
  70. };
  71.  
  72. window.addEventListener('load', function(event) {
  73. var sheet = document.body.appendChild(document.createElement('style')).sheet;
  74.  
  75. sheet.insertRule(
  76. '.rc-imageselect-table-33, .rc-imageselect-table-42, .rc-imageselect-table-44' +
  77. '{ transition-duration: ' + (1 / SPEED) + 's !important }', 0);
  78. sheet.insertRule(
  79. '.rc-imageselect-tile' +
  80. '{ transition-duration: ' + (4 / SPEED) + 's !important }', 1);
  81. sheet.insertRule(
  82. '.rc-imageselect-dynamic-selected' +
  83. '{ transition-duration: ' + (2 / SPEED) + 's !important }', 2);
  84. sheet.insertRule(
  85. '.rc-imageselect-progress' +
  86. '{ transition-duration: ' + (1 / SPEED) + 's !important }', 3);
  87. sheet.insertRule(
  88. '.rc-image-tile-overlay' +
  89. '{ transition-duration: ' + (1 / SPEED) + 's !important }', 4);
  90.  
  91. var handler = selector.handle.bind(selector);
  92.  
  93. document.body.addEventListener('mouseover', handler, false);
  94. document.body.addEventListener('mousedown', handler, false);
  95. document.body.addEventListener('mouseup', handler, false);
  96. });
  97.  
  98. function publish(func) {
  99. if (typeof exportFunction == 'function') {
  100. return exportFunction(func, unsafeWindow);
  101. }
  102.  
  103. return func;
  104. }
  105.  
  106. var __setTimeout = unsafeWindow.setTimeout.bind(unsafeWindow);
  107.  
  108. unsafeWindow.setTimeout = publish(function(callback, delay) {
  109. return __setTimeout(callback, Number(delay) / SPEED);
  110. });