mirror of
https://github.com/GuySandler/CanvasRefined.git
synced 2026-11-25 23:17:56 +01:00
more list mode compatibility
This commit is contained in:
1 parent
6aa50259e4
commit
b859108ac8
4 files changed
+142
-36
No files matched your search
+5
-2
@@ -1388,8 +1388,11 @@ function setup() {
|
||||
// activate revert to original card colors button
|
||||
document.querySelector("#revert-colors").addEventListener("click", () => {
|
||||
chrome.storage.local.get("previous_colors", local => {
|
||||
if (local["previous_colors"] !== null) {
|
||||
sendFromPopup("setcolors", local["previous_colors"].colors);
|
||||
const prev = local["previous_colors"];
|
||||
// Guard against unset/expired-shape entries and the empty lists
|
||||
// old list-mode runs stored — sending [] would be a silent no-op.
|
||||
if (prev && Array.isArray(prev.colors) && prev.colors.length > 0) {
|
||||
sendFromPopup("setcolors", prev.colors);
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user