[READ-ONLY] Mirror of https://github.com/jackmawer/virtual-trmnl. Small webpage to emulate a TRMNL display
0

Configure Feed

Select the types of activity you want to include in your feed.

Change debug logging to supply returned data from TRMNL api

authored by

Jack and committed by
GitHub
(Feb 16, 2025, 7:34 PM UTC) 1861ff7d 0ae070d9

+1 -1
+1 -1
index.html
··· 4 4 <script> 5 5 async function updateDisplay(key) { 6 6 const apiResp = await fetch("https://usetrmnl.com/api/display", {headers:{"access-token": key}}); 7 - console.dir(apiResp); 8 7 if (!apiResp.ok) setTimeout(()=>updateDisplay(key), 5000); 9 8 const data = await apiResp.json(); 9 + console.dir(data); 10 10 if (data.image_url) document.querySelector('body').style.background = `center / contain no-repeat white url('${data.image_url}')`; 11 11 if (data.refresh_rate) setTimeout(()=>updateDisplay(key), data.refresh_rate*1000) 12 12 else setTimeout(()=>updateDisplay(key), 5000)