diff options
| author | Bob Zeleznik <zzzman@gmail.com> | 2020-04-23 00:53:08 -0400 |
|---|---|---|
| committer | Bob Zeleznik <zzzman@gmail.com> | 2020-04-23 00:53:08 -0400 |
| commit | 72f614f023a4bac6a2f0b63a1b1a16e6f4545c7a (patch) | |
| tree | d4301e4ff97b783ab9795e5af48c14a38cfe886f /src/client/util/History.ts | |
| parent | b26e908122a5c9182bdb5135664bed5c1cd19ddb (diff) | |
fixed browser back after link navigation. simplified menus more. fixed jitter mode to be seeded. fixed menu gear for collections. .
Diffstat (limited to 'src/client/util/History.ts')
| -rw-r--r-- | src/client/util/History.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/util/History.ts b/src/client/util/History.ts index 545e8acb4..2c53d7e52 100644 --- a/src/client/util/History.ts +++ b/src/client/util/History.ts @@ -40,8 +40,12 @@ export namespace HistoryUtil { // } } + let _lastStatePush = 0; export function pushState(state: ParsedUrl) { - history.pushState(state, "", createUrl(state)); + if (Date.now() - _lastStatePush > 1000) { + history.pushState(state, "", createUrl(state)); + } + _lastStatePush = Date.now(); } export function replaceState(state: ParsedUrl) { |
