From 6b063216873da430a5e4f4d68230f24cd5b54a3f Mon Sep 17 00:00:00 2001 From: Guy Sandler Date: Sun, 25 Oct 2026 16:35:44 -0700 Subject: [PATCH] more stuff --- _locales/de/messages.json | 5 ++- _locales/en/messages.json | 5 ++- _locales/es/messages.json | 5 ++- _locales/fr/messages.json | 5 ++- _locales/it/messages.json | 5 ++- _locales/ja/messages.json | 5 ++- _locales/pt_PT/messages.json | 5 ++- _locales/ru/messages.json | 5 ++- _locales/sv/messages.json | 5 ++- _locales/zh_CN/messages.json | 5 ++- _locales/zh_TW/messages.json | 5 ++- css/content.css | 1 + css/darkmodecss.js | 17 +++++++++++ html/popup.html | 4 +-- js/content.js | 59 +++++++++++++++++++++++++++++++++--- js/popup.js | 6 +++- 16 files changed, 124 insertions(+), 18 deletions(-) diff --git a/_locales/de/messages.json b/_locales/de/messages.json index 07f1099..a8b39ff 100644 --- a/_locales/de/messages.json +++ b/_locales/de/messages.json @@ -1416,7 +1416,7 @@ "message": "Funktionen suchen..." }, "search_hint": { - "message": "Beginne zu tippen, um deine Module und Aufgaben zu durchsuchen. Verwende @kursname, um einen bestimmten Kurs zu durchsuchen, oder @grades, um die Notenseite eines Kurses zu öffnen." + "message": "Beginne zu tippen, um deine Module und Aufgaben zu durchsuchen. Verwende @kursname, um einen bestimmten Kurs zu durchsuchen, oder @grades, um die Notenseite eines Kurses zu öffnen, oder @home, um zu deinem Dashboard zu springen." }, "search_navigate": { "message": "navigieren" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "Datei" }, + "search_type_home": { + "message": "Startseite" + }, "search_type_item": { "message": "Element" }, diff --git a/_locales/en/messages.json b/_locales/en/messages.json index effa7cc..c8b78ab 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -1440,7 +1440,7 @@ "message": "Search features..." }, "search_hint": { - "message": "Start typing to search your modules and assignments. Use @coursename to search a specific course, or @grades to open a course's grades page." + "message": "Start typing to search your modules and assignments. Use @coursename to search a specific course, or @grades to open a course's grades page, or @home to jump to your dashboard." }, "search_index_count": { "message": "{{COUNT}} items" @@ -1523,6 +1523,9 @@ "search_type_grades": { "message": "Grades" }, + "search_type_home": { + "message": "Home" + }, "search_type_item": { "message": "Item" }, diff --git a/_locales/es/messages.json b/_locales/es/messages.json index 32c2ab7..65a35ee 100644 --- a/_locales/es/messages.json +++ b/_locales/es/messages.json @@ -1416,7 +1416,7 @@ "message": "Buscar funciones..." }, "search_hint": { - "message": "Empieza a escribir para buscar en tus módulos y tareas. Usa @coursename para buscar un curso concreto, o @grades para abrir la página de notas de un curso." + "message": "Empieza a escribir para buscar en tus módulos y tareas. Usa @coursename para buscar un curso concreto, o @grades para abrir la página de notas de un curso, o @home para ir a tu panel." }, "search_navigate": { "message": "navegar" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "Archivo" }, + "search_type_home": { + "message": "Inicio" + }, "search_type_item": { "message": "Elemento" }, diff --git a/_locales/fr/messages.json b/_locales/fr/messages.json index da79f23..4136267 100644 --- a/_locales/fr/messages.json +++ b/_locales/fr/messages.json @@ -1416,7 +1416,7 @@ "message": "Rechercher des fonctionnalités..." }, "search_hint": { - "message": "Commencez à taper pour rechercher vos modules et devoirs. Utilisez @nomducours pour chercher un cours précis, ou @grades pour ouvrir la page des notes d'un cours." + "message": "Commencez à taper pour rechercher vos modules et devoirs. Utilisez @nomducours pour chercher un cours précis, ou @grades pour ouvrir la page des notes d'un cours, ou @home pour aller à votre tableau de bord." }, "search_navigate": { "message": "naviguer" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "Fichier" }, + "search_type_home": { + "message": "Accueil" + }, "search_type_item": { "message": "Élément" }, diff --git a/_locales/it/messages.json b/_locales/it/messages.json index d12eae1..cff7f94 100644 --- a/_locales/it/messages.json +++ b/_locales/it/messages.json @@ -1416,7 +1416,7 @@ "message": "Cerca funzioni..." }, "search_hint": { - "message": "Inizia a digitare per cercare moduli e consegne. Usa @corsonome per cercare un corso specifico o @grades per aprire la pagina dei voti di un corso." + "message": "Inizia a digitare per cercare moduli e consegne. Usa @corsonome per cercare un corso specifico o @grades per aprire la pagina dei voti di un corso, oppure @home per andare alla tua dashboard." }, "search_navigate": { "message": "naviga" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "File" }, + "search_type_home": { + "message": "Home" + }, "search_type_item": { "message": "Elemento" }, diff --git a/_locales/ja/messages.json b/_locales/ja/messages.json index 6cdab9b..208f1bd 100644 --- a/_locales/ja/messages.json +++ b/_locales/ja/messages.json @@ -1416,7 +1416,7 @@ "message": "機能を検索..." }, "search_hint": { - "message": "モジュールや課題を検索するには入力してください。@コース名で特定のコースを検索、@gradesでコースの成績ページを開けます。" + "message": "モジュールや課題を検索するには入力してください。@コース名で特定のコースを検索、@gradesでコースの成績ページを開けます、または @home でダッシュボードに移動できます。" }, "search_navigate": { "message": "移動" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "ファイル" }, + "search_type_home": { + "message": "ホーム" + }, "search_type_item": { "message": "項目" }, diff --git a/_locales/pt_PT/messages.json b/_locales/pt_PT/messages.json index d53dcfb..24ce2fb 100644 --- a/_locales/pt_PT/messages.json +++ b/_locales/pt_PT/messages.json @@ -1416,7 +1416,7 @@ "message": "Pesquisar funcionalidades..." }, "search_hint": { - "message": "Começa a escrever para procurar módulos e trabalhos. Usa @nomedocurso para procurar num curso específico, ou @grades para abrir a página de notas de um curso." + "message": "Começa a escrever para procurar módulos e trabalhos. Usa @nomedocurso para procurar num curso específico, ou @grades para abrir a página de notas de um curso, ou @home para ires para o teu painel." }, "search_navigate": { "message": "navegar" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "Ficheiro" }, + "search_type_home": { + "message": "Início" + }, "search_type_item": { "message": "Item" }, diff --git a/_locales/ru/messages.json b/_locales/ru/messages.json index a525ec3..bbdc9ec 100644 --- a/_locales/ru/messages.json +++ b/_locales/ru/messages.json @@ -1416,7 +1416,7 @@ "message": "Поиск функций..." }, "search_hint": { - "message": "Начните вводить текст, чтобы искать модули и задания. Используйте @названиекурса для поиска по конкретному курсу или @grades, чтобы открыть страницу оценок курса." + "message": "Начните вводить текст, чтобы искать модули и задания. Используйте @названиекурса для поиска по конкретному курсу или @grades, чтобы открыть страницу оценок курса, или @home, чтобы перейти на главную." }, "search_navigate": { "message": "перемещение" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "Файл" }, + "search_type_home": { + "message": "Главная" + }, "search_type_item": { "message": "Элемент" }, diff --git a/_locales/sv/messages.json b/_locales/sv/messages.json index 92045c6..2cba7ef 100644 --- a/_locales/sv/messages.json +++ b/_locales/sv/messages.json @@ -1416,7 +1416,7 @@ "message": "Sök funktioner..." }, "search_hint": { - "message": "Börja skriva för att söka bland moduler och uppgifter. Använd @kursnamn för att söka i en viss kurs, eller @grades för att öppna en kurs betygssida." + "message": "Börja skriva för att söka bland moduler och uppgifter. Använd @kursnamn för att söka i en viss kurs, eller @grades för att öppna en kurs betygssida, eller @home för att gå till din översikt." }, "search_navigate": { "message": "navigera" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "Fil" }, + "search_type_home": { + "message": "Start" + }, "search_type_item": { "message": "Objekt" }, diff --git a/_locales/zh_CN/messages.json b/_locales/zh_CN/messages.json index 49c5d60..748006d 100644 --- a/_locales/zh_CN/messages.json +++ b/_locales/zh_CN/messages.json @@ -1416,7 +1416,7 @@ "message": "搜索功能..." }, "search_hint": { - "message": "开始输入以搜索你的模块和作业。使用 @课程名 搜索特定课程,或使用 @grades 打开课程的成绩页面。" + "message": "开始输入以搜索你的模块和作业。使用 @课程名 搜索特定课程,或使用 @grades 打开课程的成绩页面,或输入 @home 跳转到你的仪表板。" }, "search_navigate": { "message": "导航" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "文件" }, + "search_type_home": { + "message": "主页" + }, "search_type_item": { "message": "项目" }, diff --git a/_locales/zh_TW/messages.json b/_locales/zh_TW/messages.json index 7750b26..f5f3201 100644 --- a/_locales/zh_TW/messages.json +++ b/_locales/zh_TW/messages.json @@ -1416,7 +1416,7 @@ "message": "搜尋功能..." }, "search_hint": { - "message": "開始輸入以搜尋你的課程模組和作業。使用 @課程名稱 搜尋特定課程,或使用 @grades 開啟課程的成績頁面。" + "message": "開始輸入以搜尋你的課程模組和作業。使用 @課程名稱 搜尋特定課程,或使用 @grades 開啟課程的成績頁面,或輸入 @home 前往你的儀表板。" }, "search_navigate": { "message": "瀏覽" @@ -1472,6 +1472,9 @@ "search_type_file": { "message": "檔案" }, + "search_type_home": { + "message": "首頁" + }, "search_type_item": { "message": "項目" }, diff --git a/css/content.css b/css/content.css index c7e0124..2ea8d62 100644 --- a/css/content.css +++ b/css/content.css @@ -373,6 +373,7 @@ .canvasrefined-gs-type-link, .canvasrefined-gs-type-external-tool { background: #fff4d6; color: #7a5b00; border-color: #f1dfab; } .canvasrefined-gs-type-course { background: #dff3f3; color: #0b6e6e; border-color: #b3dede; } .canvasrefined-gs-type-grades { background: #e8eefc; color: #1d4ed8; border-color: #c3d2f5; } +.canvasrefined-gs-type-home { background: #e7f6ec; color: #1b7a3d; border-color: #c2e6cd; } .canvasrefined-gs-status { display: flex; align-items: center; gap: 10px; padding: 6px 14px; border-top: 1px solid var(--bcborders, #e2e6e8); diff --git a/css/darkmodecss.js b/css/darkmodecss.js index b0a2d16..ff725a8 100644 --- a/css/darkmodecss.js +++ b/css/darkmodecss.js @@ -1258,6 +1258,10 @@ hr { background: transparent !important; box-shadow: none !important; } +/* InstUI flex View ships an opaque surface that stays light in dark mode */ +.css-43gqe2-view--flex-flex { + background: transparent !important; +} /* content span ships a light background + border and sets dark ink */ .css-1ta5ds2-baseButton__content { background: var(--bcbackground-1) !important; @@ -1490,4 +1494,17 @@ input[type="checkbox"]:is([name="turnitin_pledge"], [name="vericite_pledge"]) { [data-testid="similarity-pledge"] [class*="-checkboxFacade__facade"]::before { border-color: var(--bclinks) !important; } +/* the footer's full-width surface leaves a bare strip between Previous and Next */ +.module-sequence-footer, +.module-sequence-footer .module-sequence-footer-content { + background: none !important; + border-top: none !important; + box-shadow: none !important; +} +/* with the surface gone the buttons need their own outline */ +.module-sequence-footer .module-sequence-footer-button--previous a, +.module-sequence-footer .module-sequence-footer-button--next a { + border: 1px solid var(--bcborders) !important; + border-radius: 6px !important; +} `; diff --git a/html/popup.html b/html/popup.html index e303d15..8da93ed 100644 --- a/html/popup.html +++ b/html/popup.html @@ -1442,8 +1442,8 @@
-

- Dashboard Font +

+ Dashboard Font diff --git a/js/content.js b/js/content.js index 6a25495..b299b77 100644 --- a/js/content.js +++ b/js/content.js @@ -74,6 +74,7 @@ function setupNavigationListener() { if (next === current_page) return; current_page = next; watchSequenceFooter(); + applyHideAssignmentSidebar(); watchSubmissionPageButton(); watchProfileLogoutPageButton(); watchGradeAnalytics(); @@ -378,6 +379,31 @@ function watchSequenceFooter() { applyHideSequenceFooter(); } +// The assignment page's details column repeats what the assignment header already +// shows and takes half the width, so it is dropped there. CSS-only, so it survives +// Canvas re-renders and SPA navigation; removed again on any other page. +function isAssignmentShowPage() { + return /^\/courses\/\d+\/assignments\/\d+(?!\/submissions)(?:\/|$)/.test(current_page); +} + +function applyHideAssignmentSidebar() { + let style = document.getElementById("canvasrefined-hide-assignment-sidebar"); + if (!isAssignmentShowPage()) { + if (style) style.remove(); + return; + } + if (!style) { + style = document.createElement("style"); + style.id = "canvasrefined-hide-assignment-sidebar"; + style.textContent = ` + #right-side-wrapper { display: none !important; } + /* the freed column belongs to the page body */ + #not_right_side { width: 100% !important; max-width: 100% !important; } + `; + (document.head || document.documentElement).appendChild(style); + } +} + // Persistent observer keeping both assignment nav buttons mounted; // the delayed re-checks cover React hydration. function maintainAssignmentNavButtons() { @@ -992,6 +1018,7 @@ function startExtension() { // Watchers start before the async storage callbacks, so a later throw can't block them. setupNavigationListener(); + applyHideAssignmentSidebar(); watchSubmissionPageButton(); toggleDarkMode(); @@ -1639,11 +1666,12 @@ async function applyCustomBackground() { .page-title { background: none !important; } + .module-sequence-footer, .module-sequence-footer .module-sequence-footer-content { - background-color: color-mix(in srgb, var(--bcbackground-0), transparent ${bgTransparent}%) !important; - backdrop-filter: blur(${bgBlur}px) !important; - -webkit-backdrop-filter: blur(${bgBlur}px) !important; - border-radius: 5px !important; + background: none !important; + border-top: none !important; + backdrop-filter: none !important; + -webkit-backdrop-filter: none !important; } .item-group-condensed, .item-group-container { @@ -1685,6 +1713,10 @@ async function applyCustomBackground() { -webkit-backdrop-filter: blur(${bgBlur}px) !important; border-radius: 5px !important; } + /* same flex View, other emotion hash: its opaque surface hides the image */ + .css-43gqe2-view--flex-flex { + background: transparent !important; + } /* flatten inner Views to one surface; keep avatars, role pills, buttons */ .css-fiozi7-view--flex-flex [class*="-view"]:not([class*="-avatar"]):not([data-testid="pill-container"]):not([data-testid="pill-container"] *):not([class*="-baseButton"]) { background: none !important; @@ -10356,6 +10388,7 @@ const GS_KIND_CLASS = { externalurl: "link", externaltool: "external-tool", grades: "grades", + home: "home", }; function gsKindClass(kind) { @@ -10366,6 +10399,7 @@ function gsKindLabel(kind) { if (kind === "course") return getMsg("search_type_course", "Course"); if (kind === "module") return getMsg("search_type_module", "Module"); if (kind === "grades") return getMsg("search_type_grades", "Grades"); + if (kind === "home") return getMsg("search_type_home", "Home"); return prettyModuleItemType(kind); } @@ -10969,6 +11003,23 @@ async function runGlobalSearch(query, resultsEl) { resultsEl.innerHTML = `
${getMsg("search_hint", "Start typing to search your modules and assignments. Use @coursename to search a specific course, or @grades to open a course's grades page.")}
`; return []; } + + // "@home" opens the dashboard and needs no index, so it answers before the + // empty-index guard below. + if (query.trim().toLowerCase() === "@home") { + const homeRows = [{ + kind: "home", + cls: "home", + type: gsKindLabel("home"), + title: getMsg("dashboard", "Dashboard"), + course: "", + courseId: null, + url: `${domain}/`, + }]; + resultsEl.innerHTML = homeRows.map((item, i) => globalSearchRowHtml(item, i)).join(""); + bindGlobalSearchRows(resultsEl, homeRows); + return homeRows; + } if (!index.length) { resultsEl.innerHTML = indexing ? `
${getMsg("search_building", "Building search index…")}
` diff --git a/js/popup.js b/js/popup.js index 416f60d..a875941 100644 --- a/js/popup.js +++ b/js/popup.js @@ -155,7 +155,11 @@ function applyI18nOverride() { document.querySelectorAll('[data-i18n]').forEach(el => { const key = el.dataset.i18n; const msg = getMsg(key); - if (msg) el.textContent = msg; + if (!msg) return; + // textContent would destroy interactive or non-text children (the font + // dropdown's arrow and its "keep font" checkbox live inside a label). + if (el.querySelector("input,select,button,a,img,picture,svg,iframe,video,canvas")) return; + el.textContent = msg; }); document.querySelectorAll('[data-i18n-placeholder]').forEach(el => { const msg = getMsg(el.dataset.i18nPlaceholder);