Skip to content

Instantly share code, notes, and snippets.

View 20kaushik02's full-sized avatar
🧘‍♂️

Kaushik Narayan Ravishankar 20kaushik02

🧘‍♂️
View GitHub Profile
@20kaushik02
20kaushik02 / custom.js
Last active October 4, 2024 20:02
Homepage (https://gethomepage.dev) widget for FoundryVTT
setInterval(() => {
let f_id = 'my_foundry_service'
let foundry_error_text = document.querySelector(`#${f_id} details summary div`);
let foundry_status_div = document.querySelector(`#${f_id} .service-container .font-thin.text-sm:nth-child(1)`);
// if API is down
if(!!foundry_error_text && foundry_error_text.innerText != "Offline") {
foundry_error_text.innerText="Offline";
}
// else check status text to set color