Advertisement
Guest User

Untitled

a guest
Jan 24th, 2017
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.32 KB | None | 0 0
  1. // ==UserScript==
  2. // @name MicroScatter Cheater Script
  3. // @namespace http://qsysmine.tk/
  4. // @version 0.1
  5. // @description Press C on microscatter to win
  6. // @author qsysmine
  7. // @match https://quizlet.com/*/microscatter
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. var cheatTime = 0;
  13. window.setCheatTime = function(mils) {
  14. cheatTime = mils;
  15. };
  16.  
  17. var $ = window.jQuery;
  18. var cheat = function() {
  19. var ids = [];
  20. var checkhasid = function(id) {
  21. for(var i in ids) {
  22. if(ids[i] == id) {
  23. return true;
  24. }
  25. }
  26. return false;
  27. };
  28. setTimeout(function() {
  29. $('.cell').each(function(index){
  30.  
  31. if(checkhasid($(this).attr("data-id"))) $('[data-id="' + $(this).attr("data-id") + '"]').trigger("click")
  32. if(!checkhasid($(this).attr("data-id"))) ids.push($(this).attr("data-id"));
  33.  
  34. });
  35. }, cheatTime);
  36. };
  37. window.startWithTime = function(mils) {
  38. setCheatTime(mils);
  39. $('#start').trigger("click");
  40. cheat();
  41. };
  42. var z = 0;
  43. $('*').keyup(function(e) {
  44. if(e.keyCode == 67 && z === 0 && $('#cells').hasClass("started")) {z = 1; cheat();}
  45. });
  46. })();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement