Remember colormap

This commit is contained in:
Misode
2022-11-10 03:59:18 +01:00
parent 3dcb1d2352
commit d07196611c
6 changed files with 37 additions and 3 deletions

View File

@@ -1,3 +1,4 @@
import type { ColormapType } from './previews/Colormap.js'
import type { VersionId } from './services/index.js'
type Method = 'menu' | 'hotkey'
@@ -110,6 +111,12 @@ export namespace Analytics {
})
}
export function setColormap(colormap: ColormapType) {
gtag('set', {
colormap,
})
}
export function resetGenerator(file_type: string, history: number, method: Method) {
event(ID_GENERATOR, 'reset')
gtag('event', 'reset_generator', {