Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "use strict";
- $(function() {
- function t(t) {
- i = !1,
- $.ajax({
- url: "check.php",
- type: "POST",
- data: {
- a: t,
- b: ""
- },
- success: function(a) {
- a.response && c(t),
- i = !0
- },
- error: function(t) {}
- })
- }
- function a(t, a) {
- $.ajax({
- url: "check.php",
- type: "POST",
- data: {
- a: t,
- b: a
- },
- success: function(t) {
- window.location = window.location.href
- },
- error: function(t) {}
- })
- }
- function e(t) {
- $("#f").submit(function(e) {
- e.preventDefault();
- var c = $(".i").val();
- a(t, c)
- })
- }
- function c(t) {
- $("#a").replaceWith(
- '<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>'
- ),
- $(".i").focus(),
- e(t)
- }
- var n = 500,
- o = null,
- i = !1;
- $.ajax({
- url: "c.php",
- cache: !1,
- type: "GET",
- dataType: "html",
- success: function(t) {
- var a = t;
- $("#a").html(a),
- i = !0
- }
- }),
- $("#a").on("touchstart click", "> *", function(a) {
- if (a.stopPropagation(), a.preventDefault(), i && !a.handled) {
- var e = parseInt($(this).attr("src")[7]),
- c = "";
- e = e < 9 ? e + 1 : 0;
- var r = "images/" + e + ".gif";
- $(this).attr("src", r),
- o && clearTimeout(o),
- o = setTimeout(function() {
- for (var a = 0; a < 7; a++) {
- var e = $("#a").children()[a];
- c += $(e).attr("src")[7]
- }
- t(parseInt(c))
- }, n),
- a.handled = !0
- }
- }).on("dblclick", function(t) {
- t.preventDefault()
- })
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement