mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-06-05 19:24:39 +00:00
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:
@@ -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(
|
||||||
|
|||||||
Reference in New Issue
Block a user