We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f3c1ee3 commit 987e617Copy full SHA for 987e617
1 file changed
modules/filters.js
@@ -12,6 +12,11 @@ export class Filters {
12
13
constructor (data) {
14
this.fontData = data
15
+
16
+ const stored_filters = JSON.parse(localStorage.getItem('filters') ?? '{}')
17
+ if (Object.keys(stored_filters).length) {
18
+ this.filters = stored_filters
19
+ }
20
}
21
22
init () {
@@ -73,6 +78,8 @@ export class Filters {
73
78
apply () {
74
79
let count = 0
75
80
81
+ localStorage.setItem('filters', JSON.stringify(this.filters))
82
76
83
Object.keys(this.filters).forEach((filter) => {
77
84
const button = document.querySelector(`button[value="${filter}"]`)
85
if (!button) {
0 commit comments