1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove string replaceAll implementations

This commit is contained in:
Bill Thornton 2022-10-15 00:27:25 -04:00
parent b008f2db30
commit 8536fe4610
6 changed files with 8 additions and 38 deletions

View file

@ -5,11 +5,6 @@ import globalize from '../scripts/globalize';
/* eslint-disable indent */
function replaceAll(originalString, strReplace, strWith) {
const reg = new RegExp(strReplace, 'ig');
return originalString.replace(reg, strWith);
}
function useNativeAlert() {
// webOS seems to block modals
// Tizen 2.x seems to block modals
@ -33,7 +28,7 @@ import globalize from '../scripts/globalize';
await appRouter.ready();
if (useNativeAlert()) {
alert(replaceAll(options.text || '', '<br/>', '\n'));
alert((options.text || '').replaceAll('<br/>', '\n'));
return Promise.resolve();
} else {
const items = [];