Skip to content

Commit 020100b

Browse files
committed
Tweaks & fixes
1 parent a6f4240 commit 020100b

File tree

4 files changed

+151
-70
lines changed

4 files changed

+151
-70
lines changed

css/content.css

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,20 @@
3636
gap: 10px;
3737
z-index: 9999;
3838
border-top: 1px solid #000;
39+
height: 30px;
40+
overflow-x: scroll;
3941
}
4042

4143
.swi-toolbar-section {
4244
display: flex;
4345
align-items: center;
44-
gap: 5px;
45-
padding: 0 10px;
46-
border-right: 1px solid #2a475e;
46+
gap: 10px;
4747
}
4848

49-
.swi-toolbar-section:last-child {
50-
border-right: none;
49+
.filter-container {
50+
display: flex;
51+
align-items: center;
52+
gap: 10px;
5153
}
5254

5355
.swi-toolbar button {
@@ -57,6 +59,7 @@
5759
padding: 5px 10px;
5860
border-radius: 2px;
5961
cursor: pointer;
62+
white-space: nowrap;
6063
}
6164

6265
.swi-toolbar button:hover {
@@ -65,23 +68,52 @@
6568

6669
.swi-toolbar .icon-filter {
6770
cursor: pointer;
68-
opacity: 1;
71+
opacity: 0.25;
6972
transition: opacity 0.2s;
73+
line-height: 1.5;
7074
}
7175

7276
.swi-toolbar .icon-filter.filtered {
73-
opacity: 0.5;
77+
opacity: 0.25;
7478
}
7579

7680
.swi-toolbar .depth-slider {
7781
width: 100px;
7882
}
7983

84+
.swi-hidden {
85+
display: none !important;
86+
}
87+
88+
.swi-toolbar-divider {
89+
width: 1px;
90+
background: #2a475e;
91+
height: 100%;
92+
z-index: 1;
93+
}
94+
95+
.swi-toolbar .filter-mode {
96+
background: #2a475e;
97+
border: none;
98+
color: #c7d5e0;
99+
padding: 4px 8px;
100+
border-radius: 2px;
101+
cursor: pointer;
102+
}
103+
104+
80105
.swi-toolbar .close-button {
81106
margin-left: auto;
82-
font-weight: bold;
83107
}
84108

85-
.swi-hidden {
86-
display: none !important;
109+
.swi-toolbar.hide-mode .icon-filter {
110+
opacity: 1;
111+
}
112+
113+
.swi-toolbar.hide-mode .icon-filter.filtered {
114+
opacity: 0.25;
115+
}
116+
117+
.swi-toolbar.only-mode .icon-filter.filtered {
118+
opacity: 1;
87119
}

scripts/background.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ async function addToBlacklist(url) {
7575
),
7676
].join("\n");
7777

78-
await chrome.storage.local.set({ "swi_settings": settings });
78+
await chrome.runtime.sendMessage({ "action": "setSettings", settings });
7979
}
8080

8181
function arrayToObject(array, key) {
@@ -258,6 +258,9 @@ function onMessage(message, sender, sendResponse) {
258258
case "getSettings":
259259
getSettings().then((settings) => sendResponse(settings));
260260
break;
261+
case "setSettings":
262+
chrome.storage.local.set({ "swi_settings": message.settings }).then(() => sendResponse(true));
263+
break;
261264
case "runSWI":
262265
case "reloadSWI":
263266
case "clearSWI":

0 commit comments

Comments
 (0)