diff options
| author | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-26 01:32:52 +0100 |
|---|---|---|
| committer | Ben Harris <bjh21@bjh21.me.uk> | 2022-10-26 21:23:54 +0100 |
| commit | 7354790ca40aa648f8ce6a6f0e568b9971a6a42c (patch) | |
| tree | 9419fb6b99d67a3f7d905f5aaba93a29d1ab4ea7 | |
| parent | 5fae5ca0db6a263d385c05cb6cfef5e3e3b18630 (diff) | |
| download | puzzles-7354790ca40aa648f8ce6a6f0e568b9971a6a42c.zip puzzles-7354790ca40aa648f8ce6a6f0e568b9971a6a42c.tar.gz puzzles-7354790ca40aa648f8ce6a6f0e568b9971a6a42c.tar.bz2 puzzles-7354790ca40aa648f8ce6a6f0e568b9971a6a42c.tar.xz | |
js: Use String.replace() in place of .replaceAll()
The latter turns out to be a little too new for KaiOS 2.5, but
.replace() will do global replacements if fed a RegExp.
| -rw-r--r-- | emcclib.js | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -165,13 +165,13 @@ mergeInto(LibraryManager.library, { * the random seed permalink. */ js_update_permalinks: function(desc, seed) { - desc = encodeURI(UTF8ToString(desc)).replaceAll("#", "%23"); + desc = encodeURI(UTF8ToString(desc)).replace(/#/g, "%23"); permalink_desc.href = "#" + desc; if (seed == 0) { permalink_seed.style.display = "none"; } else { - seed = encodeURI(UTF8ToString(seed)).replaceAll("#", "%23");; + seed = encodeURI(UTF8ToString(seed)).replace(/#/g, "%23");; permalink_seed.href = "#" + seed; permalink_seed.style.display = ""; } |