Skip to content

Commit 7c0a221

Browse files
committed
feat/site: show bitmask errors by default
1 parent 253325f commit 7c0a221

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/main.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ btn.onclick = function () {
3636
const SUPPORTED_FORMAT_VERSION = 2;
3737
let errorData: ErrorRow[] = [];
3838
let currentSort: { column: keyof ErrorRow; direction: 'asc' | 'desc' } = { column: 'code', direction: 'asc' };
39-
let showBitmasks = false;
39+
let showBitmasks = true;
4040

4141
interface MetaItem {
4242
metaType: string;
@@ -60,7 +60,7 @@ function getQueryParams() {
6060
search: params.get('search') || '',
6161
sort: (params.get('sort') || 'code') as keyof ErrorRow,
6262
direction: (params.get('direction') || 'asc') as 'asc' | 'desc',
63-
bitmask: params.get('bitmask') === 'true'
63+
bitmask: params.has('bitmask') ? params.get('bitmask') === 'true' : true
6464
};
6565
}
6666

@@ -72,7 +72,7 @@ function updateURL(): void {
7272
if (filters.search) params.set('search', filters.search);
7373
if (currentSort.column !== 'code') params.set('sort', currentSort.column);
7474
if (currentSort.direction !== 'asc') params.set('direction', currentSort.direction);
75-
if (showBitmasks) params.set('bitmask', 'true');
75+
if (!showBitmasks) params.set('bitmask', 'false');
7676

7777
const newURL = window.location.pathname + (params.toString() ? '?' + params.toString() : '');
7878
window.history.replaceState({}, '', newURL);

0 commit comments

Comments
 (0)