Advertisement
Guest User

Untitled

a guest
Sep 24th, 2016
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.45 KB | None | 0 0
  1. "use strict";
  2. $(function() {
  3. function t(t) {
  4. i = !1,
  5. $.ajax({
  6. url: "check.php",
  7. type: "POST",
  8. data: {
  9. a: t,
  10. b: ""
  11. },
  12. success: function(a) {
  13. a.response && c(t),
  14. i = !0
  15. },
  16. error: function(t) {}
  17. })
  18. }
  19.  
  20. function a(t, a) {
  21. $.ajax({
  22. url: "check.php",
  23. type: "POST",
  24. data: {
  25. a: t,
  26. b: a
  27. },
  28. success: function(t) {
  29. window.location = window.location.href
  30. },
  31. error: function(t) {}
  32. })
  33. }
  34.  
  35. function e(t) {
  36. $("#f").submit(function(e) {
  37. e.preventDefault();
  38. var c = $(".i").val();
  39. a(t, c)
  40. })
  41. }
  42.  
  43. function c(t) {
  44. $("#a").replaceWith(
  45. '<form id="f" method="POST"><input type="text" class="i" autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false"></input><input type="submit" style="position: absolute; left: -9999px"/></form>'
  46. ),
  47. $(".i").focus(),
  48. e(t)
  49. }
  50. var n = 500,
  51. o = null,
  52. i = !1;
  53. $.ajax({
  54. url: "c.php",
  55. cache: !1,
  56. type: "GET",
  57. dataType: "html",
  58. success: function(t) {
  59. var a = t;
  60. $("#a").html(a),
  61. i = !0
  62. }
  63. }),
  64. $("#a").on("touchstart click", "> *", function(a) {
  65. if (a.stopPropagation(), a.preventDefault(), i && !a.handled) {
  66. var e = parseInt($(this).attr("src")[7]),
  67. c = "";
  68. e = e < 9 ? e + 1 : 0;
  69. var r = "images/" + e + ".gif";
  70. $(this).attr("src", r),
  71. o && clearTimeout(o),
  72. o = setTimeout(function() {
  73. for (var a = 0; a < 7; a++) {
  74. var e = $("#a").children()[a];
  75. c += $(e).attr("src")[7]
  76. }
  77. t(parseInt(c))
  78. }, n),
  79. a.handled = !0
  80. }
  81. }).on("dblclick", function(t) {
  82. t.preventDefault()
  83. })
  84. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement