This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Returns a promise that resolves after a setTimeout wait period of "seconds" | |
const wait = async (seconds = 1)=> { | |
seconds *= 1000; | |
return new Promise((resolve, reject) => { setTimeout(resolve, seconds)}); | |
} | |
//Targets the second stacks refresh button (the one when a stack is being viewed) and clicks it on a loop | |
const runStackRefresh = async () =>{ | |
const stackRefreshBtn = document.getElementsByClassName("stacks-refresh-button")[1]; | |
while(true){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Select all code elements containing HTML code snippets | |
const codeElements = document.querySelectorAll('code'); | |
// Loop through each code element | |
codeElements.forEach(codeElement => { | |
// Get the inner HTML of the code element and replace entities | |
let codeHTML = codeElement.innerHTML | |
// Remove the syntax highlighting tags and surrounding quotes using a regular expression | |
codeHTML = codeHTML.replace(/^['"]?<code>|<\/code>['"]?$/g, '').replace(/<[^>]+>/g, ''); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts":{ | |
"predualStart": "echo \"DIR=\"$0\"; cd \"$DIR\"; echo \"Launching React Client in New Window\"; echo \"Current directory: \"$PWD\"\"; npm --prefix \"$PWD\"/../client start;\" > clientStarter.sh && chmod +x clientStarter.sh && open -a Terminal clientStarter.sh", | |
"dualStart": "trap 'rm clientStarter.sh' SIGINT && nodemon --inspect -r dotenv/config -i index.js", | |
} |