camelCase

master
Aevann1 2022-11-03 18:11:04 +02:00
parent 71b4bc9a8e
commit c2c5e61e60
8 changed files with 14 additions and 14 deletions

View File

@ -153,7 +153,7 @@ function buy(mb) {
function giveaward(t) { function giveaward(t) {
const kind = document.getElementById('kind').value; const kind = document.getElementById('kind').value;
postToast_callback(t.dataset.action, postToastCallback(t.dataset.action,
{ {
"kind": kind, "kind": kind,
"note": document.getElementById('note').value "note": document.getElementById('note').value

View File

@ -3,7 +3,7 @@ function removeComment(t,comment_id,button1,button2,cls) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(url, postToastCallback(url,
{ {
}, },
(xhr) => { (xhr) => {
@ -35,7 +35,7 @@ function approveComment(t,comment_id,button1,button2,cls) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(url, postToastCallback(url,
{ {
}, },
(xhr) => { (xhr) => {

View File

@ -93,7 +93,7 @@ function postToast(t, url, button1, button2, className, extraActions, extraActio
xhr[0].send(xhr[1]); xhr[0].send(xhr[1]);
} }
function postToast_callback(url, data, callback) { function postToastCallback(url, data, callback) {
let form = new FormData(); let form = new FormData();
if(typeof data === 'object' && data !== null) { if(typeof data === 'object' && data !== null) {
for(let k of Object.keys(data)) { for(let k of Object.keys(data)) {

View File

@ -1,7 +1,7 @@
function pinPost(t, id) { function pinPost(t, id) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(`/sticky/${id}`, postToastCallback(`/sticky/${id}`,
{ {
}, },
(xhr) => { (xhr) => {
@ -29,7 +29,7 @@ function pinPost(t, id) {
function unpinPost(t, id) { function unpinPost(t, id) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(`/unsticky/${id}`, postToastCallback(`/unsticky/${id}`,
{ {
}, },
(xhr) => { (xhr) => {

View File

@ -3,7 +3,7 @@ function removePost(t,post_id,button1,button2,cls) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(url, postToastCallback(url,
{ {
}, },
(xhr) => { (xhr) => {
@ -32,7 +32,7 @@ function approvePost(t,post_id,button1,button2,cls) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(url, postToastCallback(url,
{ {
}, },
(xhr) => { (xhr) => {

View File

@ -35,7 +35,7 @@ function transferCoins(mobile=false) {
let transferred = amount - Math.ceil(amount*TRANSFER_TAX); let transferred = amount - Math.ceil(amount*TRANSFER_TAX);
let username = document.getElementById('username').innerHTML; 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, "amount": document.getElementById(mobile ? "coin-transfer-amount-mobile" : "coin-transfer-amount").value,
"reason": document.getElementById(mobile ? "coin-transfer-reason-mobile" : "coin-transfer-reason").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 amount = parseInt(document.getElementById(mobile ? "bux-transfer-amount-mobile" : "bux-transfer-amount").value);
let username = document.getElementById('username').innerHTML 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, "amount": document.getElementById(mobile ? "bux-transfer-amount-mobile" : "bux-transfer-amount").value,
"reason": document.getElementById(mobile ? "bux-transfer-reason-mobile" : "bux-transfer-reason").value "reason": document.getElementById(mobile ? "bux-transfer-reason-mobile" : "bux-transfer-reason").value

View File

@ -116,7 +116,7 @@
function approve_hat(t, name) { function approve_hat(t, name) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(`/admin/approve/hat/${name}`, postToastCallback(`/admin/approve/hat/${name}`,
{ {
"description": document.getElementById(`${name}-description`).value, "description": document.getElementById(`${name}-description`).value,
"name": document.getElementById(`${name}-name`).value, "name": document.getElementById(`${name}-name`).value,
@ -137,7 +137,7 @@
function remove_hat(t, name) { function remove_hat(t, name) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(`/remove/hat/${name}`, postToastCallback(`/remove/hat/${name}`,
{ {
}, },
(xhr) => { (xhr) => {

View File

@ -118,7 +118,7 @@
function approve_marsey(t, name) { function approve_marsey(t, name) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(`/admin/approve/marsey/${name}`, postToastCallback(`/admin/approve/marsey/${name}`,
{ {
"tags": document.getElementById(`${name}-tags`).value, "tags": document.getElementById(`${name}-tags`).value,
"name": document.getElementById(`${name}-name`).value, "name": document.getElementById(`${name}-name`).value,
@ -138,7 +138,7 @@
function remove_marsey(t, name) { function remove_marsey(t, name) {
t.disabled = true; t.disabled = true;
t.classList.add("disabled"); t.classList.add("disabled");
postToast_callback(`/remove/marsey/${name}`, postToastCallback(`/remove/marsey/${name}`,
{ {
}, },
(xhr) => { (xhr) => {