We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a8de996 commit 69eb88cCopy full SHA for 69eb88c
src/common/logger.ts
@@ -5,7 +5,10 @@
5
* https://opensource.org/licenses/MIT
6
*/
7
8
-let OPEN_LOG = false
+const STORAGE_KEY = "_logOpen"
9
+const STORAGE_VAL = "1"
10
+
11
+let OPEN_LOG = localStorage.getItem(STORAGE_KEY) === STORAGE_VAL
12
13
/**
14
* @since 0.0.4
@@ -20,6 +23,7 @@ export function log(...args: any) {
20
23
21
24
export function openLog(): string {
22
25
OPEN_LOG = true
26
+ localStorage.setItem(STORAGE_KEY, STORAGE_VAL)
27
return 'Opened the log manually.'
28
}
29
@@ -28,5 +32,6 @@ export function openLog(): string {
32
33
export function closeLog(): string {
30
34
OPEN_LOG = false
35
+ localStorage.removeItem(STORAGE_KEY)
31
36
return 'Closed the log manually.'
37
0 commit comments