Skip to content

Commit aeeed6b

Browse files
committed
ChromeOS CustomBack v2.1
1 parent 2674704 commit aeeed6b

File tree

3 files changed

+10
-6
lines changed

3 files changed

+10
-6
lines changed

css/inject.css

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@
1818
}
1919
}
2020

21-
#dialog {
22-
backdrop-filter: blur(var(--menu-blur-radius));
23-
}
24-
25-
#sort-menu, #file-context-menu, #directory-tree-context-menu, #gear-menu, #tasks-menu, #providers-menu, #text-context-menu, #previewMenu {
21+
#sort-menu, #file-context-menu, #roots-context-menu, #directory-tree-context-menu, #gear-menu, #tasks-menu, #providers-menu, #text-context-menu, #previewMenu {
2622
background-color: rgba(var(--txt-cros-sys-app_base_shaded), var(--menu-opacity));
2723
backdrop-filter: blur(var(--menu-blur-radius));
2824
}

js/inject.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ window.addEventListener('load', async () => {
3030

3131
switch (location.hostname) {
3232
case 'os-settings':
33+
break;
3334
case 'file-manager':
35+
// inject blur code to file-quick-view shadow root
36+
const fileQuickView = document.getElementById('quick-view'),
37+
shadowRoot = fileQuickView.shadowRoot,
38+
newCss = new CSSStyleSheet;
39+
40+
newCss.insertRule('#dialog { background-color: rgba(var(--txt-cros-sys-app_base_shaded), var(--menu-opacity)); backdrop-filter: blur(var(--menu-blur-radius)); }');
41+
shadowRoot.adoptedStyleSheets.push(newCss);
3442
break;
3543
default:
3644
if (localStorage.chromeUI) {

manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"manifest_version": 3,
33
"name": "ChromeOS CustomBack",
4-
"version": "2.0",
4+
"version": "2.1",
55
"description": "Custom background for ChromeOS built-in pages/apps.",
66
"homepage_url": "https://github.com/supechicken/ChromeOS-CustomBack",
77
"author": "supechicken666@gmail.com",

0 commit comments

Comments
 (0)