From 3787a0d3b4af8c50b86dbcb341db073b2182e479 Mon Sep 17 00:00:00 2001 From: bot Date: Wed, 13 Jan 2021 21:20:29 +1100 Subject: [PATCH] console lua update --- src/package.json.console | 2 +- src/views/info.pug | 31 ++++++++++++++++++++++--------- 2 files changed, 23 insertions(+), 10 deletions(-) diff --git a/src/package.json.console b/src/package.json.console index 348bdd5..2ccca32 100755 --- a/src/package.json.console +++ b/src/package.json.console @@ -1,5 +1,5 @@ { - "name": "mydicebot-console-201027", + "name": "mydicebot-console-js-210114", "version": "1.0.0", "description": "MyDiceBot - Bet more, earn more!", "homepage": "https://mydicebot.com", diff --git a/src/views/info.pug b/src/views/info.pug index 7be5547..e77a636 100644 --- a/src/views/info.pug +++ b/src/views/info.pug @@ -3185,19 +3185,32 @@ block content if(webix.storage.local.get("mydice_goodluck_time") != null){ mydice_goodluck_time = webix.storage.local.get("mydice_goodluck_time"); } - let diff = curr_time - mydice_goodluck_time; - if(diff/1000 > 3600*24) { - if(totalprofit > 0){ + //let diff = curr_time - mydice_goodluck_time; + //if(diff/1000 > 3600*24) { + //if(totalprofit > 0){ + if(totalprofit > basebet*100000){ webix.confirm({ - title:"SUPPORT MyDiceBot", - ok:"SUPPORT!", + title:"SHARE LUCK", + ok:"SHARING", cancel:"No", - text:"Click SUPPORT button, surfing ads to help MyDiceBot getting profit for continuing development.", + text:"Share your luck in r/mydicebot community on Reddit.", callback:function(result){ if(result) { + dayf = difftime/(24*60*60); + day = Math.floor(dayf); + hourf = (dayf - day) * 24; + hour = Math.floor(hourf); + if(hourf >24){ + spent_time = Math.floor(hourf) +" hours!"; + } else{ + spent_time = Math.floor((hourf-hour) * 60)+" minutes!"; + } + let title = encodeURIComponent('Wow, I am earning '+totalprofit+' '+currency+' in just '+ spent_time); + let text = encodeURIComponent("WOW, MyDiceBot is really an amazing tool you should never miss for Bitcoin passive income!"); + let link = 'https://www.reddit.com/r/mydicebot/submit?title='+title+'&text='+text; window.open( - "https://acceptable.a-ads.com/1102518", - "Supporting MyDiceBot Page", + link, + "Share to Reddit", "width=600,height=600,status=0,toolbar=0" ); } @@ -3205,7 +3218,7 @@ block content } }); } - } + //} } try { require('electron').ipcRenderer.on('chart', (event, message) => {