same as last commit

pull/83/head
Aevann 2022-12-30 15:17:04 +02:00
parent 7ee7933773
commit 560a02b25e
3 changed files with 5 additions and 5 deletions

View File

@ -131,7 +131,7 @@ function post_reply(id){
catch(e) {console.log(e)}
if (data && data["comment"]) {
const comments = document.getElementById('replies-of-c_' + id);
const comment = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
const comment = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '').replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`);
comments.insertAdjacentHTML('beforeend', comment);
@ -179,7 +179,7 @@ function comment_edit(id){
catch(e) {console.log(e)}
if (data && data["comment"]) {
commentForm=document.getElementById('comment-text-'+id);
commentForm.innerHTML = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '')
commentForm.innerHTML = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '').replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`)
document.getElementById('cancel-edit-'+id).click()
bs_trigger(commentForm);
document.getElementById('filename-edit-reply-' + id).innerHTML = '<i class="fas fa-file"></i>';
@ -230,7 +230,7 @@ function postComment(fullname, hide){
commentForm = document.getElementById(name);
let comments = document.getElementById('replies-of-' + fullname);
let comment = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
let comment = data["comment"].replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '').replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`);
comments.insertAdjacentHTML('afterbegin', comment);

View File

@ -11,7 +11,7 @@ function more_comments(cid, sort) {
xhr.onload=function(){
if (xhr.status==200) {
let e = document.getElementById(`replies-of-c_${cid}`)
e.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
e.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '').replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`);
bs_trigger(e)
highlight_unread("old-comment-counts")

View File

@ -9,7 +9,7 @@ function view_more(pid,sort,offset,ids) {
xhr.onload=function(){
if (xhr.status==200) {
let e = document.getElementById(`view_more-${offset}`);
e.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '');
e.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '').replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`);
bs_trigger(e)
highlight_unread("old-comment-counts")