.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated
Signed-off-by: Tobias Speicher <rootcommander@gmail.com>
chrome 61 supports modules, but support for the coalesce operator
was only added in chrome 80. We don't transpile any syntax in the
es6 build, so things break in chrome 61 - 79. Let's just have everyone
use the legacy build which is only ~150kb instead of ~30kb and
not run the risk of running into more issues like this.
Alternatively, we can transpile some of the more recent syntax
features we use like coalescing operator, but don't feel like
making an exhaustive list of these atm.