From e8c2008121744d327cc48b3c00b10ac4a636c909 Mon Sep 17 00:00:00 2001 From: Wanninger Date: Sat, 18 Dec 2021 16:28:31 +0100 Subject: [PATCH 1/7] + replaced "claim single" with "claim all" + empty catch for claiming --- index.js | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/index.js b/index.js index e323a1b..eb9dec2 100644 --- a/index.js +++ b/index.js @@ -41,18 +41,10 @@ setTimeout(res, random(...pauseBetweenTabSwitches)) ); - const claimBtns = [...document.querySelectorAll(".btn-claim")]; - - for (let i = claimBtns.length; i > 1; --i) { - const claimBtn = document.querySelector( - `.container-menu-right .h-full:nth-child(${i - 1}) .btn-claim` - ); - claimBtn.click(); - - await new Promise((res) => + const claimBtn = document.querySelector(".Claim All"); + try { claimBtn.click(); } catch {} + await new Promise((res) => setTimeout(res, random(...pauseAndAfterMinig)) - ); - } } await new Promise((res) => From 53045724f64408f082812a8c3743c12c878d9135 Mon Sep 17 00:00:00 2001 From: Wanninger Date: Sat, 18 Dec 2021 16:36:05 +0100 Subject: [PATCH 2/7] + fixed mining pause between claims --- index.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index eb9dec2..ef8988d 100644 --- a/index.js +++ b/index.js @@ -38,17 +38,16 @@ for (const leftPanelBt of leftPanelBts) { leftPanelBt.click(); await new Promise((res) => - setTimeout(res, random(...pauseBetweenTabSwitches)) - ); + setTimeout(res, random(...pauseBetweenTabSwitches))); const claimBtn = document.querySelector(".Claim All"); try { claimBtn.click(); } catch {} + await new Promise((res) => - setTimeout(res, random(...pauseAndAfterMinig)) + setTimeout(res, random(...pauseAndAfterMinig))); } await new Promise((res) => - setTimeout(res, random(...pauseBetweenTabSwitches)) - ); + setTimeout(res, random(...pauseBetweenTabSwitches))); } })(); From c04eab7e411b8bcea30f8c6c592d57879bb7179d Mon Sep 17 00:00:00 2001 From: constronov Date: Sat, 18 Dec 2021 16:40:04 +0100 Subject: [PATCH 3/7] Update README.md - readme --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index 64b7cd2..3b72b89 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,11 @@ https://youtu.be/rYehqByJPHs ## Changelog +### 18/12/2021 + +- Removed single claims -> Claim all to reduce transactions +- fixed bug: null reference + ### 12/12/2021 - Added a random pause between actions From f2454b2e13be143b2ae409f169ef433c88d6e444 Mon Sep 17 00:00:00 2001 From: Wanninger Date: Sat, 18 Dec 2021 17:09:03 +0100 Subject: [PATCH 4/7] + check if claim is ready --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index ef8988d..38058ba 100644 --- a/index.js +++ b/index.js @@ -40,8 +40,11 @@ await new Promise((res) => setTimeout(res, random(...pauseBetweenTabSwitches))); - const claimBtn = document.querySelector(".Claim All"); - try { claimBtn.click(); } catch {} + const claimBtns = [...document.querySelectorAll(".btn-claim")]; + if(claimBtns.length > 0) { + const claimBtn = document.querySelector(".Claim All"); + try { claimBtn.click(); } catch {} + } await new Promise((res) => setTimeout(res, random(...pauseAndAfterMinig))); From 41186065c9e5c22a23d9ea8e261ea487738b49aa Mon Sep 17 00:00:00 2001 From: Wanninger Date: Sat, 18 Dec 2021 17:28:35 +0100 Subject: [PATCH 5/7] + fixed false reference -> Claim all --- index.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/index.js b/index.js index 38058ba..58c8b06 100644 --- a/index.js +++ b/index.js @@ -42,12 +42,11 @@ const claimBtns = [...document.querySelectorAll(".btn-claim")]; if(claimBtns.length > 0) { - const claimBtn = document.querySelector(".Claim All"); + const claimBtn = document.querySelector(".btn-claim"); try { claimBtn.click(); } catch {} - } - - await new Promise((res) => + await new Promise((res) => setTimeout(res, random(...pauseAndAfterMinig))); + } } await new Promise((res) => From eebd7412e6cfcdd4169f9584f6a0d2a1152cda3f Mon Sep 17 00:00:00 2001 From: Wanninger Date: Fri, 24 Dec 2021 10:47:46 +0100 Subject: [PATCH 6/7] + increased pause after mining --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 58c8b06..b4b5ad0 100644 --- a/index.js +++ b/index.js @@ -4,8 +4,8 @@ // Pause between tab switches (10 sec) const pauseBetweenTabSwitches = [5 * 1000, 15 * 1000]; - // Pause after mining (20 sec) - const pauseAndAfterMinig = [15 * 1000, 25 * 1000]; + // Pause after mining (40 sec) + const pauseAndAfterMinig = [35 * 1000, 45 * 1000]; // Close error popup if need setInterval(() => { From 20e86b73c028075f4ea2c089ed648c3e364c3a23 Mon Sep 17 00:00:00 2001 From: constronov Date: Wed, 19 Oct 2022 22:38:30 +0200 Subject: [PATCH 7/7] add repair --- index.js | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/index.js b/index.js index b4b5ad0..fa2106f 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,5 @@ (async () => { - const random = (min, max) => - Math.floor(Math.random() * (max - min + 1) + min); + const random = (min, max) => Math.floor(Math.random() * (max - min + 1) + min); // Pause between tab switches (10 sec) const pauseBetweenTabSwitches = [5 * 1000, 15 * 1000]; @@ -12,8 +11,8 @@ const btnCancel = document.querySelector( ".container-card-error .btn-cancel" ); - - if (btnCancel) btnCancel?.click(); + if (btnCancel) + btnCancel?.click(); }, random(8 * 1000, 12 * 1000)); setInterval(() => { @@ -40,13 +39,23 @@ await new Promise((res) => setTimeout(res, random(...pauseBetweenTabSwitches))); + // claim and withdraw const claimBtns = [...document.querySelectorAll(".btn-claim")]; - if(claimBtns.length > 0) { - const claimBtn = document.querySelector(".btn-claim"); - try { claimBtn.click(); } catch {} - await new Promise((res) => - setTimeout(res, random(...pauseAndAfterMinig))); - } + if(claimBtns.length > 0) { + const claimBtn = document.querySelector(".btn-claim"); + try { claimBtn.click(); } catch {} + await new Promise((res) => + setTimeout(res, random(...pauseAndAfterMinig))); + } + + // repair + const repBtns = [...document.querySelectorAll(".btn-mine")]; + if(repBtns.length > 0) { + const repBtns = document.querySelector(".btn-mine"); + try { repBtns.click(); } catch {} + await new Promise((res) => + setTimeout(res, random(...pauseAndAfterMinig))); + } } await new Promise((res) =>