mirror of
https://github.com/GuySandler/CanvasRefined.git
synced 2026-11-25 15:07:57 +01:00
background changer 2
fixed css issues to make cards dark theme compatible, removed file upload due to bad quality
This commit is contained in:
1 parent
03c61eb51d
commit
a7aea08668
5 files changed
+20
-35
No files matched your search
+18
-8
@@ -261,7 +261,10 @@ function startExtension() {
|
||||
changeFavicon();
|
||||
updateReminders();
|
||||
applyCustomBackground();
|
||||
|
||||
//getClassAverages();
|
||||
|
||||
setTimeout(() => document.getElementById("footer").remove(), 800);
|
||||
setTimeout(() => runDarkModeFixer(false), 800);
|
||||
setTimeout(() => runDarkModeFixer(false), 4500);
|
||||
});
|
||||
@@ -375,7 +378,6 @@ function applyOptionsChanges(changes) {
|
||||
applyAestheticChanges();
|
||||
break;
|
||||
case ("customBackgroundLink"):
|
||||
case ("customBackgroundUpload"):
|
||||
applyCustomBackground();
|
||||
break;
|
||||
}
|
||||
@@ -387,13 +389,21 @@ function applyCustomBackground() {
|
||||
let style = document.querySelector("#bettercanvas-background") || document.createElement('style');
|
||||
style.id = "bettercanvas-background";
|
||||
|
||||
if (options.customBackgroundUpload && options.customBackgroundUpload !== "") {
|
||||
style.textContent = `#not_right_side { background-image: url('${options.customBackgroundUpload}') !important; background-size: cover !important; background-attachment: fixed !important; }`;
|
||||
} else if (options.customBackgroundLink && options.customBackgroundLink !== "") {
|
||||
style.textContent = `#not_right_side { background-image: url('${options.customBackgroundLink}') !important; background-size: cover !important; background-attachment: fixed !important; }
|
||||
.ic-Dashboard-header__layout { background: none !important; }`; // try to make this hide things underneath and add to other side
|
||||
} else {
|
||||
style.textContent = "";
|
||||
if (options.customBackgroundLink && options.customBackgroundLink !== "") {
|
||||
style.textContent = `
|
||||
#not_right_side {
|
||||
background-image: url('${options.customBackgroundLink}') !important;
|
||||
background-size: cover !important;
|
||||
background-attachment: fixed !important;
|
||||
}
|
||||
.ic-Dashboard-header__layout {
|
||||
background: none !important;
|
||||
backdrop-filter: blur(10px) !important;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.bettercanvas-gpa-card {background: var(--bcbackground-0) !important;}
|
||||
.bettercanvas-gpa {background: var(--bcbackground-0) !important;}
|
||||
.ic-DashboardCard {background: var(--bcbackground-0) !important;}`; // todo: liquid glass?
|
||||
}
|
||||
|
||||
document.documentElement.appendChild(style);
|
||||
|
||||
Reference in new issue
Block a user