diff options
author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-11-25 14:25:11 -0500 |
---|---|---|
committer | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2019-11-26 22:06:27 -0500 |
commit | 527595f79bf97bc2d17cb821c8bb6b4e8b6776f9 (patch) | |
tree | 848035c9eb864e872999ca22d8ac5e15e8c3a9fa /ext/bg/js/audio.js | |
parent | 1daed122909532f5ec5c4b470ddf7f791944cf73 (diff) |
Remove unnecessary escapes from regex literals
Diffstat (limited to 'ext/bg/js/audio.js')
-rw-r--r-- | ext/bg/js/audio.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/bg/js/audio.js b/ext/bg/js/audio.js index 9bbbf902..dc0ba5eb 100644 --- a/ext/bg/js/audio.js +++ b/ext/bg/js/audio.js @@ -107,7 +107,7 @@ const audioUrlBuilders = { 'custom': async (definition, optionsContext) => { const options = await apiOptionsGet(optionsContext); const customSourceUrl = options.audio.customSourceUrl; - return customSourceUrl.replace(/\{([^\}]*)\}/g, (m0, m1) => (hasOwn(definition, m1) ? `${definition[m1]}` : m0)); + return customSourceUrl.replace(/\{([^}]*)\}/g, (m0, m1) => (hasOwn(definition, m1) ? `${definition[m1]}` : m0)); } }; @@ -133,7 +133,7 @@ function audioUrlNormalize(url, baseUrl, basePath) { // Begins with "/" url = baseUrl + url; } - } else if (!/^[a-z][a-z0-9\+\-\.]*:/i.test(url)) { + } else if (!/^[a-z][a-z0-9\-+.]*:/i.test(url)) { // No URI scheme => relative path url = baseUrl + basePath + url; } |