diff --git a/files/assets/js/award_modal.js b/files/assets/js/award_modal.js index 405876f7e..ed4ef8537 100644 --- a/files/assets/js/award_modal.js +++ b/files/assets/js/award_modal.js @@ -139,7 +139,7 @@ function buy(mb) { xhr[0].onload = function() { let data try {data = JSON.parse(xhr[0].response)} - catch(e) {console.log(e)} + catch(e) {console.error(e)} success = xhr[0].status >= 200 && xhr[0].status < 300; showToast(success, getMessageFromJsonData(success, data), true); if (success) { diff --git a/files/assets/js/ban_modal.js b/files/assets/js/ban_modal.js index 47b698e4d..2f8dab8c2 100644 --- a/files/assets/js/ban_modal.js +++ b/files/assets/js/ban_modal.js @@ -9,7 +9,7 @@ function banModal(link, name, fullname, cls) { xhr[0].onload = function() { let data try {data = JSON.parse(xhr[0].response)} - catch(e) {console.log(e)} + catch(e) {console.error(e)} success = xhr[0].status >= 200 && xhr[0].status < 300; showToast(success, getMessageFromJsonData(success, data)); document.getElementById(`unban-${fullname}`).classList.toggle(cls); @@ -31,7 +31,7 @@ function chudModal(link, name, fullname, cls) { xhr[0].onload = function() { let data try {data = JSON.parse(xhr[0].response)} - catch(e) {console.log(e)} + catch(e) {console.error(e)} success = xhr[0].status >= 200 && xhr[0].status < 300; showToast(success, getMessageFromJsonData(success, data)); document.getElementById(`unchud-${fullname}`).classList.toggle(cls); diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index f1605d2c1..a187626aa 100644 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -135,7 +135,7 @@ function post_reply(id){ let data try {data = JSON.parse(xhr[0].response)} - catch(e) {console.log(e)} + catch(e) {console.error(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, '').replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`); @@ -191,7 +191,7 @@ function comment_edit(id){ let data try {data = JSON.parse(xhr[0].response)} - catch(e) {console.log(e)} + catch(e) {console.error(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, '').replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`) @@ -248,7 +248,7 @@ function post_comment(fullname, hide){ let data try {data = JSON.parse(xhr.response)} - catch(e) {console.log(e)} + catch(e) {console.error(e)} if (data && data["comment"]) { if (hide) document.getElementById(hide).classList.add('d-none'); @@ -309,7 +309,7 @@ function handle_action(type, cid, thing) { xhr.onload=function(){ let data try {data = JSON.parse(xhr.response)} - catch(e) {console.log(e)} + catch(e) {console.error(e)} if (data && data["response"]) { const element = document.getElementById(`${type}-${cid}`); element.innerHTML = data["response"].replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`) diff --git a/files/assets/js/report_post_modal.js b/files/assets/js/report_post_modal.js index c60ecd71f..8c4d88205 100644 --- a/files/assets/js/report_post_modal.js +++ b/files/assets/js/report_post_modal.js @@ -38,7 +38,7 @@ function report_postModal(id) { xhr.onload = function() { let data try {data = JSON.parse(xhr.response)} - catch(e) {console.log(e)} + catch(e) {console.error(e)} success = xhr.status >= 200 && xhr.status < 300; showToast(success, getMessageFromJsonData(success, data)); }; diff --git a/files/assets/js/submit.js b/files/assets/js/submit.js index 059addb22..93f8bb1d7 100644 --- a/files/assets/js/submit.js +++ b/files/assets/js/submit.js @@ -129,7 +129,7 @@ function checkRepost() { xhr.onload=function(){ try {data = JSON.parse(xhr.response)} - catch(e) {console.log(e)} + catch(e) {console.error(e)} if (data && data["permalink"]) { const permalinkText = escapeHTML(data["permalink"]);