vxcvcxvcxxcv
This commit is contained in:
parent
2db66c6149
commit
cbaed361b4
13 changed files with 16 additions and 23 deletions
|
@ -103,7 +103,6 @@ function pick(kind) {
|
|||
}
|
||||
|
||||
function buy(mb) {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
const kind = document.getElementById('kind').value;
|
||||
const xhr = new XMLHttpRequest();
|
||||
url = `/buy/${kind}`
|
||||
|
@ -135,6 +134,7 @@ function buy(mb) {
|
|||
let ownednum = Number(owned.textContent);
|
||||
owned.textContent = ownednum + 1
|
||||
} else {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
if (data && data["error"]) document.getElementById('toast-post-error-text2').innerText = data["error"];
|
||||
new bootstrap.Toast(document.getElementById('toast-post-error2')).show();
|
||||
}
|
||||
|
|
|
@ -9,8 +9,6 @@ function post(url) {
|
|||
};
|
||||
|
||||
function post_toast3(url, button1, button2) {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url, true);
|
||||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
|
@ -39,6 +37,7 @@ function post_toast3(url, button1, button2) {
|
|||
document.getElementById(button2).classList.toggle("d-md-inline-block");
|
||||
|
||||
} else {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
new bootstrap.Toast(document.getElementById('toast-post-error')).show();
|
||||
}
|
||||
|
@ -115,8 +114,6 @@ function delete_commentModal(id) {
|
|||
};
|
||||
|
||||
function post_reply(id){
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
|
||||
var form = new FormData();
|
||||
form.append('formkey', formkey());
|
||||
form.append('parent_id', id);
|
||||
|
@ -131,6 +128,7 @@ function post_reply(id){
|
|||
commentForm.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '').replace('comment-collapse-desktop d-none d-md-block','d-none').replace('border-left: 2px solid','padding-left:0;border-left: 0px solid')
|
||||
}
|
||||
else {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
try{
|
||||
let data = JSON.parse(xhr.response)
|
||||
document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
|
@ -143,8 +141,6 @@ function post_reply(id){
|
|||
}
|
||||
|
||||
function comment_edit(id){
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
|
||||
var form = new FormData();
|
||||
|
||||
form.append('formkey', formkey());
|
||||
|
@ -162,6 +158,7 @@ function comment_edit(id){
|
|||
document.getElementById('cancel-edit-'+id).click()
|
||||
}
|
||||
else {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
try{
|
||||
let data = JSON.parse(xhr.response)
|
||||
document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
|
@ -174,8 +171,6 @@ function comment_edit(id){
|
|||
}
|
||||
|
||||
function post_comment(fullname){
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
|
||||
const btn = document.getElementById('save-reply-to-'+fullname)
|
||||
btn.classList.add('disabled');
|
||||
|
||||
|
@ -197,6 +192,7 @@ function post_comment(fullname){
|
|||
commentForm.innerHTML = xhr.response.replace(/data-src/g, 'src').replace(/data-cfsrc/g, 'src').replace(/style="display:none;visibility:hidden;"/g, '')
|
||||
}
|
||||
else {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
try{
|
||||
let data = JSON.parse(xhr.response)
|
||||
document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
|
|
|
@ -10,8 +10,6 @@ tooltipTriggerList.map(function(element){
|
|||
});
|
||||
|
||||
function post_toast(url, reload, data) {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url, true);
|
||||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
|
@ -35,6 +33,7 @@ function post_toast(url, reload, data) {
|
|||
new bootstrap.Toast(document.getElementById('toast-post-success')).show();
|
||||
if (reload == 1) {location.reload(true)}
|
||||
} else {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
new bootstrap.Toast(document.getElementById('toast-post-error')).show();
|
||||
}
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
function post_toast2(url, button1, button2) {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
|
||||
const xhr = new XMLHttpRequest();
|
||||
xhr.open("POST", url, true);
|
||||
xhr.setRequestHeader('xhr', 'xhr');
|
||||
|
@ -29,6 +27,7 @@ function post_toast2(url, button1, button2) {
|
|||
document.getElementById(button2).classList.toggle("d-none");
|
||||
|
||||
} else {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
if (data && data["error"]) document.getElementById('toast-post-error-text').innerText = data["error"];
|
||||
new bootstrap.Toast(document.getElementById('toast-post-error')).show();
|
||||
}
|
||||
|
|
|
@ -125,8 +125,6 @@ function transferBux(mobile=false) {
|
|||
}
|
||||
|
||||
function submitFormAjax(e) {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
|
||||
document.getElementById('message').classList.add('d-none');
|
||||
document.getElementById('message-mobile').classList.add('d-none');
|
||||
document.getElementById('message-preview').classList.add('d-none');
|
||||
|
@ -165,6 +163,7 @@ function submitFormAjax(e) {
|
|||
} else if (xhr.status >= 300 && xhr.status < 400) {
|
||||
window.location.href = JSON.parse(xhr.response)["redirect"]
|
||||
} else {
|
||||
document.getElementById('toast-post-error-text').innerText = "Error, please try again later."
|
||||
try {
|
||||
let data=JSON.parse(xhr.response);
|
||||
var myToast = new bootstrap.Toast(document.getElementById('toast-post-error'));
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<script src="/static/assets/js/award_modal.js?a=208"></script>
|
||||
<script src="/static/assets/js/award_modal.js?a=209"></script>
|
||||
<div class="modal fade" id="awardModal" tabindex="-1" role="dialog" aria-labelledby="awardModalTitle" aria-hidden="true">
|
||||
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered awardmodal" role="document">
|
||||
<div class="modal-content pb-4">
|
||||
|
|
|
@ -104,6 +104,6 @@
|
|||
</nav>
|
||||
{% endif %}
|
||||
|
||||
<script src="/static/assets/js/post_toast2.js?a=202"></script>
|
||||
<script src="/static/assets/js/post_toast2.js?a=203"></script>
|
||||
|
||||
{% endblock %}
|
|
@ -867,7 +867,7 @@
|
|||
|
||||
{% if v %}
|
||||
<script src="/static/assets/js/marked.js?a=202"></script>
|
||||
<script src="/static/assets/js/comments_v.js?a=202"></script>
|
||||
<script src="/static/assets/js/comments_v.js?a=203"></script>
|
||||
{% endif %}
|
||||
|
||||
<script src="/static/assets/js/clipboard.js?a=202"></script>
|
||||
|
|
|
@ -314,7 +314,7 @@
|
|||
<script src="/static/assets/js/lozad.js?a=202"></script>
|
||||
|
||||
{% if v %}
|
||||
<script src="/static/assets/js/post_toast2.js?a=202"></script>
|
||||
<script src="/static/assets/js/post_toast2.js?a=203"></script>
|
||||
<script src="/static/assets/js/formatting.js?a=202"></script>
|
||||
<script src="/static/assets/js/default.js?a=202"></script>
|
||||
{% endif %}
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
</div>
|
||||
</nav>
|
||||
|
||||
<script src="/static/assets/js/header.js?a=203"></script>
|
||||
<script src="/static/assets/js/header.js?a=204"></script>
|
||||
|
||||
<style>
|
||||
.notif-count {
|
||||
|
|
|
@ -690,7 +690,7 @@
|
|||
|
||||
{% if v %}
|
||||
<div id='tax' class="d-none">{% if v.patron or u.patron or v.alts_patron or u.alts_patron %}0{% else %}0.03{% endif %}</div>
|
||||
<script src="/static/assets/js/userpage_v.js?a=202"></script>
|
||||
<script src="/static/assets/js/userpage_v.js?a=203"></script>
|
||||
<div id="username" class="d-none">{{u.username}}</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
|
||||
{% if v %}
|
||||
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
|
||||
<script src="/static/assets/js/userpage_v.js?a=202"></script>
|
||||
<script src="/static/assets/js/userpage_v.js?a=203"></script>
|
||||
<div id="username" class="d-none">{{u.username}}</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
|
||||
{% if v %}
|
||||
<div id='tax' class="d-none">{% if v.patron or u.patron %}0{% else %}0.03{% endif %}</div>
|
||||
<script src="/static/assets/js/userpage_v.js?a=202"></script>
|
||||
<script src="/static/assets/js/userpage_v.js?a=203"></script>
|
||||
<div id="username" class="d-none">{{u.username}}</div>
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue