diff options
Diffstat (limited to 'static/nick-lift.js')
-rw-r--r-- | static/nick-lift.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/static/nick-lift.js b/static/nick-lift.js new file mode 100644 index 0000000..343608a --- /dev/null +++ b/static/nick-lift.js @@ -0,0 +1,7 @@ +var nickTimeout +Array.from(document.getElementsByClassName('kysNick')).forEach( (a) => { + a.addEventListener('mousedown', (event) => { nickTimeout = setTimeout( + () => { document.location = '/#nick_reset'}, 5000) }) + a.addEventListener('mouseup', (event) => { clearTimeout (nickTimeout) }) + a.addEventListener('mouseout', (event) => { clearTimeout (nickTimeout) }) +})
\ No newline at end of file |