fix(web): improve determination of default path 🍒
Browser extensions can dynamically insert scripts into a web page, so it's possible that the last script is not what we expected, which can cause the path to the script to be wrong. This change fixes the determination of the default path by using the `document.currentScript` property. It also replaces the use of the deprecated `substr` function in those places.
Cherry-pick-of: #15159Fixes: #15158
Keyman makes it possible for you to type in any language
on Windows, macOS, Linux, iPhone, iPad, Android tablets and phones, and even
instantly in your web browser. Create keyboard layouts with Keyman Developer and
share them with the community in the keyboards
repository. The Keyman
Community have so far contributed
well over 1,000 keyboard layouts for over 2,500 languages!
License
Copyright (c) SIL Global.
Keyman is an open source project distributed under the MIT license.