schoolbox web extension :)
0
fork

Configure Feed

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

fix(plugins/progressBar): hot reload

willow c745024c a2b2cbdb

+4 -1
+4 -1
src/entrypoints/plugins/progressBar/index.ts
··· 16 16 17 17 const progressRow = document.createElement("tr"); 18 18 progressRow.classList.add("progress-container"); 19 - setDataAttr(progressRow, `${PLUGIN_ID}-row`); 20 19 document.querySelector(".timetable > thead")?.insertAdjacentElement("beforeend", progressRow); 21 20 22 21 injectInlineStyles(styleText, PLUGIN_ID); 23 22 injectProgressBars(periodList, progressRow); 23 + 24 + setDataAttr(progressRow, `${PLUGIN_ID}-row`); 24 25 } 25 26 }, 26 27 () => { ··· 32 33 } 33 34 34 35 function injectProgressBars(periodList: Period[], container: HTMLElement) { 36 + if (document.querySelector(dataAttr(`${PLUGIN_ID}-row`))) return; 37 + 35 38 for (const period of periodList) { 36 39 const td = document.createElement("td"); 37 40 const progressBar = document.createElement("progress");