rdsedmundo

[API] 10fastfingers.com auto-type - @v2.0

Mar 29th, 2013
2,320
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2. * 10fastfingers.com - cheat
  3.  **** @@v2 - UPDATE 29/03/13
  4. * by kyl3 (www.pastebin.com/u/kyl3)
  5.  
  6.          Hotkeys:
  7.          - Press E for auto-type the next word and auto-enter.
  8.          - Press I for full auto-type by the seconds that you set.
  9.          - Press P for preview your results while you're typing/hacking.
  10. */
  11. if (!"jQuery" in window) throw "jQuery ($) not defined";
  12.  
  13. var preview = false;
  14.  
  15. (window.Hack = (function () {
  16.     var Word = document.getElementsByClassName('highlight')[0];
  17.     $('#inputfield').val(Word.innerHTML).trigger({
  18.         type: 'keyup',
  19.         which: 32
  20.     });
  21.  
  22.     if (error_correct >= 319) {
  23.         alert("Finished");
  24.         (D) ? window.clearInterval(D) : null;
  25.     }
  26. }))
  27.  
  28. $(function () {
  29.     $(document).keydown(function (k) {
  30.  
  31.         if (k.keyCode == 69) {
  32.             Hack();
  33.             return !1;
  34.         }
  35.  
  36.         if (k.keyCode == 73) {
  37.             window.D = window.setInterval(function () {
  38.                 Hack();
  39.             }, prompt("Delay (in seconds)", "") * 1000);
  40.             return !1;
  41.         }
  42.  
  43.         if (preview) {
  44.             wpm_now = Math.round(error_keystrokes / 5) + 2;
  45.             $('#results-preview').html("<font size='+3'><b>WPM:</b> " + wpm_now + "<br><b>KeyStr:</b> " + error_keystrokes + "<br><b>Hits:</b> " + error_correct + "<br><b>Wrongs:</b> " + error_wrong + "</<font size='+3'>");
  46.         }
  47.  
  48.         if (k.keyCode == 80) {
  49.             $('#words').before("<div id='results-preview'></div>");
  50.             preview = true;
  51.         }
  52.     })
  53.  
  54. })
RAW Paste Data