]> www.infradead.org Git - users/dwmw2/vpnc-scripts.git/commit
Add polyfill for String.prototype.trim in vpnc-script-win.js
authorDaniel Lenski <dlenski@gmail.com>
Wed, 22 Sep 2021 19:12:00 +0000 (19:12 +0000)
committerDaniel Lenski <dlenski@gmail.com>
Wed, 22 Sep 2021 19:12:00 +0000 (19:12 +0000)
commit6aa36580e1f31d81b6be3f6da7a4d28c260de392
treedd55ec9b2d8498bd716f59e2ca918f3fe8d1be00
parentab1fdbcf99deb7439bd892b3f3b2c20ece414e57
Add polyfill for String.prototype.trim in vpnc-script-win.js

As noted in https://gitlab.com/openconnect/openconnect/-/issues/312#note_684460541,
Windows Scripting Host's "JScript" does not appear to support
the `String.prototype.trim` method, apparently due to being
based on a very old ECMAScript standard.

The straightforward solution is to use the JavaScript polyfill
described in https://stackoverflow.com/a/35456830.

Signed-off-by: Daniel Lenski <dlenski@gmail.com>
vpnc-script-win.js