Fix random frontend (problem info, lazy load img, comment pagedown)

This commit is contained in:
cuom1999 2024-02-26 14:31:33 -06:00
parent 7bba448ef5
commit 3f53c62d4d
11 changed files with 131 additions and 96 deletions

View file

@ -400,14 +400,8 @@ function onWindowReady() {
});
setTimeout(() => {
$("[data-src]img").each(function() {
$(this).attr("src", $(this).attr("data-src"));
})
$("[data-src]iframe").each(function() {
$(this).attr("src", $(this).attr("data-src"));
})
register_markdown_editors();
}, "100");
}, 100);
$('form').submit(function (evt) {
// Prevent multiple submissions of forms, see #565

View file

@ -23,12 +23,6 @@ $(function () {
csrfmiddlewaretoken: $.cookie('csrftoken')
}, function (result) {
$content.html(result);
$(".dmmd-preview-content [data-src]img").each(function() {
$(this).attr("src", $(this).attr("data-src"));
})
$(".dmmd-preview-content [data-src]iframe").each(function() {
$(this).attr("src", $(this).attr("data-src"));
})
$preview.addClass('dmmd-preview-has-content').removeClass('dmmd-preview-stale');
renderKatex($content[0]);
});

View file

@ -73,7 +73,7 @@
}
.filter-form-group {
margin-top: 5px;
margin-top: 15px;
}
}