forked from MarseyWorld/MarseyWorld
camelCase
parent
71b4bc9a8e
commit
c2c5e61e60
|
@ -153,7 +153,7 @@ function buy(mb) {
|
|||
|
||||
function giveaward(t) {
|
||||
const kind = document.getElementById('kind').value;
|
||||
postToast_callback(t.dataset.action,
|
||||
postToastCallback(t.dataset.action,
|
||||
{
|
||||
"kind": kind,
|
||||
"note": document.getElementById('note').value
|
||||
|
|
|
@ -3,7 +3,7 @@ function removeComment(t,comment_id,button1,button2,cls) {
|
|||
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(url,
|
||||
postToastCallback(url,
|
||||
{
|
||||
},
|
||||
(xhr) => {
|
||||
|
@ -35,7 +35,7 @@ function approveComment(t,comment_id,button1,button2,cls) {
|
|||
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(url,
|
||||
postToastCallback(url,
|
||||
{
|
||||
},
|
||||
(xhr) => {
|
||||
|
|
|
@ -93,7 +93,7 @@ function postToast(t, url, button1, button2, className, extraActions, extraActio
|
|||
xhr[0].send(xhr[1]);
|
||||
}
|
||||
|
||||
function postToast_callback(url, data, callback) {
|
||||
function postToastCallback(url, data, callback) {
|
||||
let form = new FormData();
|
||||
if(typeof data === 'object' && data !== null) {
|
||||
for(let k of Object.keys(data)) {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
function pinPost(t, id) {
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(`/sticky/${id}`,
|
||||
postToastCallback(`/sticky/${id}`,
|
||||
{
|
||||
},
|
||||
(xhr) => {
|
||||
|
@ -29,7 +29,7 @@ function pinPost(t, id) {
|
|||
function unpinPost(t, id) {
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(`/unsticky/${id}`,
|
||||
postToastCallback(`/unsticky/${id}`,
|
||||
{
|
||||
},
|
||||
(xhr) => {
|
||||
|
|
|
@ -3,7 +3,7 @@ function removePost(t,post_id,button1,button2,cls) {
|
|||
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(url,
|
||||
postToastCallback(url,
|
||||
{
|
||||
},
|
||||
(xhr) => {
|
||||
|
@ -32,7 +32,7 @@ function approvePost(t,post_id,button1,button2,cls) {
|
|||
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(url,
|
||||
postToastCallback(url,
|
||||
{
|
||||
},
|
||||
(xhr) => {
|
||||
|
|
|
@ -35,7 +35,7 @@ function transferCoins(mobile=false) {
|
|||
let transferred = amount - Math.ceil(amount*TRANSFER_TAX);
|
||||
let username = document.getElementById('username').innerHTML;
|
||||
|
||||
postToast_callback(`/@${username}/transfer_coins`,
|
||||
postToastCallback(`/@${username}/transfer_coins`,
|
||||
{
|
||||
"amount": document.getElementById(mobile ? "coin-transfer-amount-mobile" : "coin-transfer-amount").value,
|
||||
"reason": document.getElementById(mobile ? "coin-transfer-reason-mobile" : "coin-transfer-reason").value
|
||||
|
@ -62,7 +62,7 @@ function transferBux(mobile=false) {
|
|||
let amount = parseInt(document.getElementById(mobile ? "bux-transfer-amount-mobile" : "bux-transfer-amount").value);
|
||||
let username = document.getElementById('username').innerHTML
|
||||
|
||||
postToast_callback(`/@${username}/transfer_bux`,
|
||||
postToastCallback(`/@${username}/transfer_bux`,
|
||||
{
|
||||
"amount": document.getElementById(mobile ? "bux-transfer-amount-mobile" : "bux-transfer-amount").value,
|
||||
"reason": document.getElementById(mobile ? "bux-transfer-reason-mobile" : "bux-transfer-reason").value
|
||||
|
|
|
@ -116,7 +116,7 @@
|
|||
function approve_hat(t, name) {
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(`/admin/approve/hat/${name}`,
|
||||
postToastCallback(`/admin/approve/hat/${name}`,
|
||||
{
|
||||
"description": document.getElementById(`${name}-description`).value,
|
||||
"name": document.getElementById(`${name}-name`).value,
|
||||
|
@ -137,7 +137,7 @@
|
|||
function remove_hat(t, name) {
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(`/remove/hat/${name}`,
|
||||
postToastCallback(`/remove/hat/${name}`,
|
||||
{
|
||||
},
|
||||
(xhr) => {
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
function approve_marsey(t, name) {
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(`/admin/approve/marsey/${name}`,
|
||||
postToastCallback(`/admin/approve/marsey/${name}`,
|
||||
{
|
||||
"tags": document.getElementById(`${name}-tags`).value,
|
||||
"name": document.getElementById(`${name}-name`).value,
|
||||
|
@ -138,7 +138,7 @@
|
|||
function remove_marsey(t, name) {
|
||||
t.disabled = true;
|
||||
t.classList.add("disabled");
|
||||
postToast_callback(`/remove/marsey/${name}`,
|
||||
postToastCallback(`/remove/marsey/${name}`,
|
||||
{
|
||||
},
|
||||
(xhr) => {
|
||||
|
|
Loading…
Reference in New Issue