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

23 lines
433 B
JavaScript
Raw Normal View History

define([], function () {
'use strict';
2018-10-23 01:05:09 +03:00
function replaceAll(str, find, replace) {
return str.split(find).join(replace);
2018-10-23 01:05:09 +03:00
}
return function (options) {
if (typeof options === 'string') {
options = {
text: options
};
}
var text = replaceAll(options.text || '', '<br/>', '\n');
alert(text);
return Promise.resolve();
};
2018-10-23 01:05:09 +03:00
});