khlieng / dispatch

Web-based IRC client in Go.
https://dispatch.khlieng.com
MIT License
642 stars 30 forks source link

Browsers without bigint support in JS: No identifiers allowed directly after numeric literal #66

Closed andwun closed 4 years ago

andwun commented 4 years ago

I wanted to give the dispatch demo at https://dispatch.khlieng.com/ a try. After the login page I consistently only see a blank screen in Safari on both macOS 10.15 (Safari version Version 13.1.2) and iOS 13. Some similar issue has been mentioned in issue #8. The console showed the error message No identifiers allowed directly after numeric literal from some minified JS file. I was able to track this down to the use of bigints in github.com/sindresorhus/fnv1a v2.0.0+ which don't seem to be supported in Safari 13, yet (see issue #10 at fnv1a for more details). client/js/utils/color.js:L19 seems to be the only place where the fnv1a hash function is used to implement the colored nicknames feature. Would it be an option to downgrade fnv1a to 1.2.0 or replace it with another hash function to improve browser compatibility?