Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.30 KB | None | 0 0
  1. "use strict";
  2. let coCoco = false;
  3.  
  4. function coc0Co() {
  5. coCoco = false;
  6. coc0C0(0)
  7. }
  8.  
  9. function coCoc0() {
  10. coCoco = true
  11. }
  12.  
  13. function coc0Cco() {
  14. if (coCoco) {
  15. C0cOco()
  16. };
  17. return coCoco
  18. }
  19.  
  20. function c0coCo() {
  21. $(".loading-cubes")["show"]();
  22. $("#mining-start")["hide"]();
  23. $("#mining-stop")["show"]()
  24. }
  25.  
  26. function C0cOco() {
  27. $(".loading-cubes")["hide"]();
  28. $("#mining-stop")["hide"]();
  29. $("#mining-start")["show"]()
  30. }
  31.  
  32. function c0coc0(variable_0, variable_1) {
  33. $(variable_0)["html"](`Произошла ошибка: ${error}`)["show"]()["fadeOut"](2000)
  34. }
  35.  
  36. function coc0C0(variable_2) {
  37. const variable_3 = JSON["stringify"]({
  38. result: variable_2
  39. });
  40. fetch("/task", {
  41. method: "POST",
  42. credentials: "include",
  43. body: variable_3
  44. })["then"]((variable_4) => {
  45. if (!variable_4["ok"]) {
  46. throw new Error(variable_4["statusText"])
  47. };
  48. return variable_4["json"]()
  49. })["then"]((variable_4) => {
  50. if (variable_2 !== 0) {
  51. $("#success")["show"]()["fadeOut"](2000)
  52. };
  53. $("#balance")["html"](Number(variable_4["balance"]));
  54. if (coc0Cco()) {
  55. return
  56. };
  57. const variable_5 = new coCoc0co(variable_4["task"]);
  58. c0coCo();
  59. setTimeout(() => variable_5["cocOc0"]())
  60. })["catch"]((variable_1) => c0coc0(".error", variable_1))
  61. }
  62. class coCoc0co {
  63. constructor(variable_60) {
  64. this["coC0c0"] = variable_60 + 1;
  65. this["c0Coco"] = 2
  66. }
  67. coCoc0() {
  68. return this["coC0c0"] % this["c0Coco"] === 0
  69. }
  70. cocOc0() {
  71. if (this["coCoc0"]()) {
  72. this["coC0c0"]++;
  73. this["c0Coco"] = 2;
  74. if (coc0Cco()) {
  75. return
  76. };
  77. setTimeout(() => this["cocOc0"]())
  78. } else {
  79. if (this["c0Coco"] > Math["sqrt"](this["coC0c0"]) + 1) {
  80. $(".loading-cubes")["hide"]();
  81. coc0C0(this["coC0c0"]);
  82. return true
  83. } else {
  84. this["c0Coco"]++;
  85. if (coc0Cco()) {
  86. return
  87. };
  88. setTimeout(() => this["cocOc0"](), 0)
  89. }
  90. }
  91. }
  92. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement