You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Prowlarr/UI/Handlebars/Helpers/Html.js

21 lines
517 B

'use strict';
define(
[
'handlebars'
], function (Handlebars) {
var placeHolder = '/Content/Images/poster-dark.jpg';
window.NzbDrone.imageError = function (img) {
if (!img.src.contains(placeHolder)) {
img.src = placeHolder;
}
img.onerror = null;
};
Handlebars.registerHelper('defaultImg', function () {
return new Handlebars.SafeString('onerror=window.NzbDrone.imageError(this)');
});
});