Revert "feat: dont inject weightings page in assements without results"

This reverts commit 2aecd63850.
Reverting so that I can solve the indexing issue. Only marked assessments are getting indexed, which is incorrect behaviour that slipped testing when the plugin was first made.
This commit is contained in:
Jaxon Lewis-Wilson
2026-05-05 16:32:12 +08:00
parent 2aecd63850
commit f721bf6609
@@ -791,19 +791,6 @@ export function injectWeightingsTab(api: any) {
if (!tabList || !container) return; if (!tabList || !container) return;
if (tabList.querySelector(".betterseqta-weightings-tab")) return; if (tabList.querySelector(".betterseqta-weightings-tab")) return;
const selectedTitle = document
.querySelector(
"[class*='AssessmentItem__AssessmentItem___'][class*='selected___'] [class*='AssessmentItem__title___']",
)
?.textContent?.trim();
const selectedAssessmentID = selectedTitle
? api.storage.assessments?.[selectedTitle]
: undefined;
// Only inject for assessments that exist in the marks/task dataset.
// This avoids showing the tab on PENDING/UPCOMING "details-only" assessments.
if (!selectedAssessmentID) return;
const cls = resolveTabSetClasses(); const cls = resolveTabSetClasses();
const prefix = (tabList.querySelector("li") as HTMLElement).id.replace( const prefix = (tabList.querySelector("li") as HTMLElement).id.replace(