jellyfin-web/dashboard-ui/bower_components/emby-webcomponents/alert/nativealert.js

23 lines
433 B
JavaScript
Raw Normal View History

2016-02-26 13:29:27 -07:00
define([], function () {
2016-10-01 23:46:32 -07:00
'use strict';
2016-02-26 13:29:27 -07:00
function replaceAll(str, find, replace) {
return str.split(find).join(replace);
}
return function (options) {
if (typeof options === 'string') {
options = {
text: options
};
}
var text = replaceAll(options.text || '', '<br/>', '\n');
alert(text);
return Promise.resolve();
};
});