diff --git a/html/popup.html b/html/popup.html index aeba99a..1bb726a 100644 --- a/html/popup.html +++ b/html/popup.html @@ -1070,6 +1070,10 @@

Dashboard Font + + + +

diff --git a/js/background.js b/js/background.js index d144bba..6e86982 100644 --- a/js/background.js +++ b/js/background.js @@ -87,6 +87,7 @@ chrome.runtime.onInstalled.addListener(function () { "todo_progress_rings": "rings", "todo_confetti": true, "todo_show_scores": false, + "custom_font_skip_p": false, "device_dark": false, "cumulative_gpa": { "name": "Cumulative GPA", "hidden": false, "weight": "dnc", "credits": 999, "gr": 3.21 }, // "show_updates": false, diff --git a/js/content.js b/js/content.js index 1e4042d..469a397 100644 --- a/js/content.js +++ b/js/content.js @@ -998,6 +998,7 @@ function applyOptionsChanges(changes) { calculateGPA2(); break; case "custom_font": + case "custom_font_skip_p": loadCustomFont(); break; case "remlogo": @@ -6415,6 +6416,49 @@ function loadDashboardNotes() { Custom font */ +// "Keep original assignment font": Canvas sets its font (Lato) on +// via author CSS, and the custom-font rule's `*` selector overrides it. To +// keep

original we (a) carve p + its descendants out of the custom rule +// and (b) pin them back to the font body had BEFORE the custom rule landed — +// plain `inherit` wouldn't work because p's ancestors still carry the custom +// font via `*`. The pre-custom font is captured once from body's computed +// style (before our