This commit is contained in:
Aevann1 2021-10-06 00:02:54 +02:00
parent 1211c98b35
commit cae2bd4d2e
6 changed files with 10 additions and 47 deletions

View file

@ -91,26 +91,6 @@ document.getElementById("reportCommentButton").onclick = function() {
}; };
document.addEventListener("DOMContentLoaded", function () {
document.getElementById('reportCommentModal').addEventListener('hidden.bs.modal', function () {
var button = document.getElementById("reportCommentButton");
var beforeModal = document.getElementById("reportCommentFormBefore");
var afterModal = document.getElementById("reportCommentFormAfter");
button.innerHTML = 'Report comment';
button.disabled = false;
afterModal.classList.add('d-none');
if (beforeModal.classList.contains('d-none')) {
beforeModal.classList.remove('d-none');
}
});
})
function openReplyBox(id) { function openReplyBox(id) {
const element = document.getElementById(`reply-to-${id}`); const element = document.getElementById(`reply-to-${id}`);
element.classList.remove('d-none') element.classList.remove('d-none')
@ -178,6 +158,9 @@ post_reply=function(id){
document.getElementById('save-reply-to-'+id).classList.add('disabled'); document.getElementById('save-reply-to-'+id).classList.add('disabled');
document.querySelectorAll('[data-src]').forEach(elem => {
elem.src = elem.dataset.src;
})
} }
comment_edit=function(id){ comment_edit=function(id){
@ -211,6 +194,9 @@ comment_edit=function(id){
} }
xhr.send(form) xhr.send(form)
document.querySelectorAll('[data-src]').forEach(elem => {
elem.src = elem.dataset.src;
})
} }
post_comment=function(fullname){ post_comment=function(fullname){

View file

@ -25,21 +25,3 @@ report_postModal = function(id) {
} }
}; };
document.getElementById('reportPostModal').addEventListener('hidden.bs.modal', function () {
var button = document.getElementById("reportPostButton");
var beforeModal = document.getElementById("reportPostFormBefore");
var afterModal = document.getElementById("reportPostFormAfter");
button.innerHTML='Report post';
button.disabled= false;
afterModal.classList.add('d-none');
if ( beforeModal.classList.contains('d-none') ) {
beforeModal.classList.remove('d-none');
}
});

View file

@ -33,7 +33,7 @@
{% if v %} {% if v %}
{% include "award_modal.html" %} {% include "award_modal.html" %}
<script src="/assets/js/comments_v.js?v=4"></script> <script src="/assets/js/comments_v.js?v=5"></script>
{% endif %} {% endif %}
<script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script> <script src="https://cdn.jsdelivr.net/npm/clipboard@2.0.8/dist/clipboard.min.js"></script>

View file

@ -1,4 +1,4 @@
<script src="/assets/js/report_post_modal.js?v=1"></script> <script src="/assets/js/report_post_modal.js?v=2"></script>
<div class="modal fade" id="reportPostModal" tabindex="-1" role="dialog" aria-labelledby="reportPostModalTitle" aria-hidden="true"> <div class="modal fade" id="reportPostModal" tabindex="-1" role="dialog" aria-labelledby="reportPostModalTitle" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered" role="document"> <div class="modal-dialog modal-dialog-centered" role="document">

View file

@ -24,11 +24,6 @@
id3.classList.remove("d-none"); id3.classList.remove("d-none");
}); });
document.getElementById('2faModal').addEventListener('hidden.bs.modal', function () {
var box = document.getElementById("2faToggle");
box.checked = !box.checked;
});
function emailVerifyText() { function emailVerifyText() {
document.getElementById("email-verify-text").innerHTML = "Verification email sent! Please check your inbox."; document.getElementById("email-verify-text").innerHTML = "Verification email sent! Please check your inbox.";
} }

View file

@ -36,7 +36,7 @@
{% if 'marsey.tech' in request.host %} {% if 'marsey.tech' in request.host %}
{% if v %} {% if v %}
<script src="/assets/js/comments_v.js?v=4"></script> <script src="/assets/js/comments_v.js?v=5"></script>
{% include "award_modal.html" %} {% include "award_modal.html" %}
{% include "emoji_modal.html" %} {% include "emoji_modal.html" %}
{% include "gif_modal.html" %} {% include "gif_modal.html" %}