From 6c1bc9dc98edf83d59ae86906281793d0c22e963 Mon Sep 17 00:00:00 2001 From: Guy Sandler Date: Tue, 25 Aug 2026 16:03:37 -0700 Subject: [PATCH] bug fixes --- js/content.js | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/js/content.js b/js/content.js index 79c71a0..d519c21 100644 --- a/js/content.js +++ b/js/content.js @@ -1220,7 +1220,23 @@ function checkDashboardReady() { const link = cards[i].querySelector(".ic-DashboardCard__link"); signature += "|" + (link ? link.getAttribute("href") : ""); } - if (signature !== lastDashboardCardSignature) { + // Canvas often re-renders the dashboard on a hard reload and + // replaces the .ic-DashboardCard nodes with fresh ones that have + // the same courses/links (so the signature is unchanged) but no + // longer carry our .canvasrefined-card-assignment marker. The + // signature guard alone would skip re-setup in that case, leaving + // card assignments empty until a popup toggle forces a reload. + // Re-run whenever any card is missing its marker too. This is safe + // from the self-retriggering reflow loop: after the pass every + // card has the marker, so our own subsequent mutation bursts skip. + let missingMarker = false; + for (let i = 0; i < cards.length; i++) { + if (!cards[i].querySelector(".canvasrefined-card-assignment")) { + missingMarker = true; + break; + } + } + if (signature !== lastDashboardCardSignature || missingMarker) { lastDashboardCardSignature = signature; changeGradientCards(); setupCardAssignments(); @@ -3061,7 +3077,7 @@ function populateAssignments(iscompleted = false) {
- ${item.context_name} + ${item.context_name} ${item.plannable.title} ${convertToDueDate(item.plannable_date)}
@@ -3161,7 +3177,7 @@ function populateAnnouncements() {
- ${item.context_name} + ${item.context_name} ${item.plannable.title} ${convertToDueDate(item.plannable_date)}