Skip to content

Commit

Permalink
Changes with delay
Browse files Browse the repository at this point in the history
  • Loading branch information
Prits001 committed Jul 11, 2022
1 parent 9d7b6b3 commit 466b3eb
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ This project was created only for good purposes and personal use.


"numberOfButtons":2, #number of buttons shown(0-2)

"loadingdelay": 5, #delay in seconds before loading

#button one name and url
"button1Text":"Button One",
"button1Link":"https://github.com/Prits001",
Expand Down
2 changes: 2 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

"numberOfButtons":2,

"loadingdelay": 5,

"button1Text":"Button One",
"button1Link":"https://github.com/Prits001",

Expand Down
5 changes: 3 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ function checkConfig(){
console.log('\x1b[36m%s\x1b[0m',"[#]", "Additional info: ", "\x1b[32m"+config.additionalinfo+"\x1b[0m")
console.log('\x1b[36m%s\x1b[0m',"[#]", "Text when hovering above large image icon: ","\x1b[32m"+config.largeimagetext+"\x1b[0m")
console.log('\x1b[36m%s\x1b[0m',"[#]", "Ammount of buttons: ","\x1b[32m"+config.numberOfButtons+"\x1b[0m")
console.log('\x1b[36m%s\x1b[0m',"[#]", "Loading Delay: ","\x1b[32m"+config.loadingdelay+"\x1b[0m")
if(config.numberOfButtons > 0){
console.log('\x1b[36m%s\x1b[0m',"[#]", "Name of the 1st button: ","\x1b[32m"+config.button1Text+"\x1b[0m")
console.log('\x1b[36m%s\x1b[0m',"[#]", "Url of the 1st button: ","\x1b[32m"+config.button1Link+"\x1b[0m")
Expand All @@ -38,9 +39,9 @@ function checkConfig(){
console.log('\x1b[36m%s\x1b[0m',"[#]", "Url of the 2nd button: ","\x1b[32m"+config.button2Link+"\x1b[0m")
}
}
console.log("Starting in 10 seconds..")
console.log(`Starting in ${config.loadingdelay} seconds..`)
console.log("\x1b[46mPress Ctrl+C to abort\x1b[0m")
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, 10000);
Atomics.wait(new Int32Array(new SharedArrayBuffer(4)), 0, 0, config.loadingdelay * 1000);
return true
}
function start(){
Expand Down

0 comments on commit 466b3eb

Please sign in to comment.