From 8b9a1ded430db1b3112344c5a0f1496dff1d6cec Mon Sep 17 00:00:00 2001 From: Guy Sandler Date: Mon, 24 Aug 2026 20:10:43 -0700 Subject: [PATCH] I don't even know bug is there, then not there --- .gitignore | 3 ++- js/content.js | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 418e351..4ebcdfa 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.zip -.vscode \ No newline at end of file +.vscode +.pi \ No newline at end of file diff --git a/js/content.js b/js/content.js index 57ecdd0..a7937c7 100644 --- a/js/content.js +++ b/js/content.js @@ -558,7 +558,10 @@ function startExtension() { toggleDarkMode(); - chrome.storage.sync.get(["better_sidebar", "sidebar_scale"], result => { + // Include bg_opacity/bg_blur so setupBetterSidebar (called below) tints the + // course-content panel with the user's slider values on first load, instead + // of falling back to the defaults until a slider is touched. + chrome.storage.sync.get(["better_sidebar", "sidebar_scale", "bg_opacity", "bg_blur"], result => { options = { ...options, ...result }; ensureBetterSidebar(); }); @@ -1017,6 +1020,23 @@ async function applyCustomBackground() { box-sizing: border-box !important; } ` : ""} + /* Course content pages (sidebar layout "course": /courses/:id/* and + /profile): tint the #content.ic-Layout-contentMain panel so the + bg_opacity/bg_blur sliders have a surface to control even without Better + Sidebar. setupBetterSidebar only adds this panel when Better Sidebar is + on; this mirrors its inline values so the panel shows regardless. When + Better Sidebar is on, its inline !important overrides these (same values), + so this rule is inert in that case. */ + ${getSidebarLayoutMode() === "course" ? ` + .ic-Layout-contentMain { + margin: 26px 38px 38px !important; + padding: 10px !important; + 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: 10px !important; + } + ` : ""} ${isConversationsPage() ? ` .css-1nh4pc4-view-flexItem { background-color: color-mix(in srgb, var(--bcbackground-0), transparent ${bgTransparent}%) !important;