From 8011e1ae412e17896b3510ea658e4f017bb9ea3f Mon Sep 17 00:00:00 2001 From: Aevann Date: Sun, 10 Mar 2024 20:46:22 +0200 Subject: [PATCH] add/remove spaces --- .../assets/events/homoween/js/eye_tracking.js | 2 +- files/assets/events/homoween/js/haunt.js | 12 +++--- files/assets/events/homoween/js/jumpscare.js | 4 +- files/assets/events/homoween/js/stab.js | 14 +++---- files/assets/events/homoween/js/stalker.js | 2 +- .../assets/events/homoween/js/trickortreat.js | 3 +- files/assets/js/bottom.js | 2 +- files/assets/js/casino/blackjack_screen.js | 2 +- files/assets/js/chat.js | 40 +++++++++---------- files/assets/js/comments_v.js | 12 +++--- files/assets/js/core.js | 12 +++--- files/assets/js/emoji_modal/emoji_modal.js | 4 +- files/assets/js/fireworks.js | 2 +- files/assets/js/flash.js | 8 ++-- files/assets/js/gif_modal.js | 6 +-- files/assets/js/lottery.js | 2 +- files/assets/js/markdown.js | 30 +++++++------- files/assets/js/mobile_navigation_bar.js | 2 +- files/assets/js/more_comments.js | 2 +- files/assets/js/orgy_file.js | 6 +-- files/assets/js/register_service_worker.js | 2 +- files/assets/js/settings_profile.js | 2 +- files/assets/js/settings_security.js | 2 +- files/assets/js/signup.js | 4 +- files/assets/js/submit.js | 2 +- files/assets/js/view_more.js | 2 +- 26 files changed, 90 insertions(+), 91 deletions(-) diff --git a/files/assets/events/homoween/js/eye_tracking.js b/files/assets/events/homoween/js/eye_tracking.js index 188e2b166..8dbcd43f0 100644 --- a/files/assets/events/homoween/js/eye_tracking.js +++ b/files/assets/events/homoween/js/eye_tracking.js @@ -33,7 +33,7 @@ if (innerWidth >= 992) y = point1["y"] - point2["y"], angle = Math.atan(y/x) - if(point1["x"] < point2["x"]) { + if (point1["x"] < point2["x"]) { angle += Math.PI } diff --git a/files/assets/events/homoween/js/haunt.js b/files/assets/events/homoween/js/haunt.js index 678feacd1..fab199007 100644 --- a/files/assets/events/homoween/js/haunt.js +++ b/files/assets/events/homoween/js/haunt.js @@ -9,14 +9,14 @@ stylesheet_haunted.setAttribute("href", "/assets/events/homoween/css/haunt2.css? stylesheet_haunted.disabled = true document.head.appendChild(stylesheet_haunted) -window.onload = function(){ +window.onload = function() { if (thunder1) thunder2.volume = 0.5 lightningStrike("normal") } -setInterval(function(){ - if(Math.floor(Math.random()*3) > 1){ +setInterval(function() { + if (Math.floor(Math.random()*3) > 1) { lightningStrike("haunted") } else { lightningStrike("normal") @@ -26,18 +26,18 @@ setInterval(function(){ function lightningStrike(strike) { div.style.animation = "haunted 20s" - if(strike == "haunted"){ + if (strike == "haunted") { stylesheet_haunted.disabled = false if (thunder1) thunder2.play() - setTimeout(function(){ + setTimeout(function() { stylesheet_haunted.disabled = true }, 700) } if (thunder1) thunder1.play() - setTimeout(function(){ + setTimeout(function() { div.style.animation = "none" }, 1000) } diff --git a/files/assets/events/homoween/js/jumpscare.js b/files/assets/events/homoween/js/jumpscare.js index e1cfdae9c..dbb70d6bb 100644 --- a/files/assets/events/homoween/js/jumpscare.js +++ b/files/assets/events/homoween/js/jumpscare.js @@ -7,7 +7,7 @@ function scare() { jumpscare_audio.play(); // Hide image and reset sound - setTimeout(function () { + setTimeout(function() { image.style.display = "none"; jumpscare_audio.pause() jumpscare_audio.currentTime = 0; @@ -15,7 +15,7 @@ function scare() { } if (Math.random() <= 0.1) { - setTimeout(function () { + setTimeout(function() { const xhr = new XMLHttpRequest(); xhr.open("POST", "/jumpscare"); xhr.setRequestHeader('xhr', 'xhr'); diff --git a/files/assets/events/homoween/js/stab.js b/files/assets/events/homoween/js/stab.js index ae1b20415..a386c3f0a 100644 --- a/files/assets/events/homoween/js/stab.js +++ b/files/assets/events/homoween/js/stab.js @@ -1,6 +1,6 @@ /* Copyright (C) 2013 Justin Windle, http://soulwire.co.uk */ -(function ( root, factory ) { +(function( root, factory ) { if ( typeof exports === 'object' ) { @@ -18,7 +18,7 @@ root.Sketch = factory( root, root.document ); } -}( typeof window !== "undefined" ? window : this, function ( window, document ) { +}( typeof window !== "undefined" ? window : this, function( window, document ) { "use strict"; /* @@ -378,7 +378,7 @@ context.dragging; - while( min ) + while (min) isString( eventMap[ min ] ) ? @@ -648,16 +648,16 @@ let blood = Sketch.create({autoclear: false, autopause: false}), blood.update = function() { let d = drops.length; - while(d < dropCount && i < maxDrops) { + while (d < dropCount && i < maxDrops) { let drop = new Drop(); drops.push(drop); d++; i++; } - while(d-- && i < maxDrops) { + while (d-- && i < maxDrops) { let drop = drops[d]; drop.y += drop.vy; - if(drop.y - drop.radius > blood.height) { + if (drop.y - drop.radius > blood.height) { drops.splice(d,1); } } @@ -665,7 +665,7 @@ blood.update = function() { blood.draw = function() { let d = drops.length; - while(d-- && i < maxDrops) { + while (d-- && i < maxDrops) { let drop = drops[d]; blood.beginPath(); blood.fillStyle = 'rgba('+drop.r+','+drop.g+','+drop.b+',.8)'; diff --git a/files/assets/events/homoween/js/stalker.js b/files/assets/events/homoween/js/stalker.js index 05d73ea00..7c7917651 100644 --- a/files/assets/events/homoween/js/stalker.js +++ b/files/assets/events/homoween/js/stalker.js @@ -80,7 +80,7 @@ function makeCircle() { } } -addEventListener("mousemove", function (e) { +addEventListener("mousemove", function(e) { mouse.x = e.pageX; mouse.y = e.pageY; }); diff --git a/files/assets/events/homoween/js/trickortreat.js b/files/assets/events/homoween/js/trickortreat.js index ddcd2c086..610d87abd 100644 --- a/files/assets/events/homoween/js/trickortreat.js +++ b/files/assets/events/homoween/js/trickortreat.js @@ -17,8 +17,7 @@ function postToastLoadTrickOrTreat(xhr) { success = xhr.status >= 200 && xhr.status < 300; showToast(success, getMessageFromJsonData(success, data)); - if (data["result"] == 0){ + if (data["result"] == 0) { scare() } } - diff --git a/files/assets/js/bottom.js b/files/assets/js/bottom.js index fb6c49c44..6c30725dd 100644 --- a/files/assets/js/bottom.js +++ b/files/assets/js/bottom.js @@ -172,7 +172,7 @@ bs_trigger(document); const negative_awards = document.querySelectorAll("[data-positive=False]") -document.addEventListener("click", function (e) { +document.addEventListener("click", function(e) { let element = e.target if (element.tagName == "I") element = element.parentElement diff --git a/files/assets/js/casino/blackjack_screen.js b/files/assets/js/casino/blackjack_screen.js index 203c998fb..58130777f 100644 --- a/files/assets/js/casino/blackjack_screen.js +++ b/files/assets/js/casino/blackjack_screen.js @@ -184,7 +184,7 @@ function updateCardsetBackgrounds(state, complete = false) { for (const cardset of cardsets) { ['PLAYING', 'LOST', 'PUSHED', 'WON', 'BLACKJACK'].forEach(status => cardset.classList.remove(`blackjack-cardset__${status}`)); } - if (complete){ + if (complete) { const wager = state.has_player_split ? state?.wager?.amount * 2 : state?.wager?.amount; let dealerShows = state.payout < wager ? 'WON': 'LOST'; if (state.payout === wager || (state.player_doubled_down && state.status === 'PUSHED')) dealerShows = 'PUSHED' diff --git a/files/assets/js/chat.js b/files/assets/js/chat.js index 66bdf5398..e344fd681 100644 --- a/files/assets/js/chat.js +++ b/files/assets/js/chat.js @@ -39,7 +39,7 @@ socket.on('speak', function(json) { } chatline.classList.remove('chat-mention'); - if (text_html.includes(` is typing..."; } - else if (users.length==2){ + else if (users.length==2) { document.getElementById('typing-indicator').innerHTML = ''+users[0]+" and "+users[1]+" are typing..."; } else { @@ -309,7 +309,7 @@ socket.on('refresh_chat', () => { location.reload() }) -document.addEventListener('click', function (e) { +document.addEventListener('click', function(e) { if (e.target.classList.contains('delconfirm')) { e.target.nextElementSibling.classList.remove('d-none'); e.target.classList.add('d-none'); @@ -350,18 +350,18 @@ send_hearbeat() setInterval(send_hearbeat, 20000); box.scrollTo(0, box.scrollHeight) -setTimeout(function () { +setTimeout(function() { box.scrollTo(0, box.scrollHeight) }, 200); -setTimeout(function () { +setTimeout(function() { box.scrollTo(0, box.scrollHeight) }, 500); -setTimeout(function () { +setTimeout(function() { box.scrollTo(0, box.scrollHeight) }, 1000); -setTimeout(function () { +setTimeout(function() { box.scrollTo(0, box.scrollHeight) }, 1500); -document.addEventListener('DOMContentLoaded', function () { +document.addEventListener('DOMContentLoaded', function() { box.scrollTo(0, box.scrollHeight) }); diff --git a/files/assets/js/comments_v.js b/files/assets/js/comments_v.js index bafd643b3..d719bc8e4 100644 --- a/files/assets/js/comments_v.js +++ b/files/assets/js/comments_v.js @@ -84,7 +84,7 @@ function toggleReplyBox(t, id) { t.innerHTML = newHTML } -function toggleEdit(id){ +function toggleEdit(id) { const comment = document.getElementById("comment-text-"+id); const form = document.getElementById("comment-edit-"+id); const box = document.getElementById('comment-edit-body-'+id); @@ -159,7 +159,7 @@ function post_reply(id) { const upload_prog = document.getElementById(`upload-prog-c_${id}`); xhr[0].upload.onprogress = (e) => {handleUploadProgress(e, upload_prog)}; - xhr[0].onload=function(){ + xhr[0].onload=function() { upload_prog.classList.add("d-none") let data @@ -197,7 +197,7 @@ function post_reply(id) { xhr[0].send(xhr[1]); } -function comment_edit(id){ +function comment_edit(id) { const btn = document.getElementById(`edit-btn-${id}`) btn.disabled = true btn.classList.add('disabled'); @@ -217,7 +217,7 @@ function comment_edit(id){ const upload_prog = document.getElementById(`upload-prog-edit-c_${id}`); xhr[0].upload.onprogress = (e) => {handleUploadProgress(e, upload_prog)}; - xhr[0].onload=function(){ + xhr[0].onload=function() { upload_prog.classList.add("d-none") let data @@ -262,7 +262,7 @@ function comment_edit(id){ xhr[0].send(xhr[1]); } -function post_comment(fullname, hide){ +function post_comment(fullname, hide) { close_inline_emoji_modal(); const btn = document.getElementById('save-reply-to-'+fullname) @@ -294,7 +294,7 @@ function post_comment(fullname, hide){ xhr.upload.onprogress = (e) => {handleUploadProgress(e, upload_prog)}; xhr.setRequestHeader('xhr', 'xhr'); - xhr.onload=function(){ + xhr.onload=function() { upload_prog.classList.add("d-none") let data diff --git a/files/assets/js/core.js b/files/assets/js/core.js index 54f24f3ba..abcb4bc7e 100644 --- a/files/assets/js/core.js +++ b/files/assets/js/core.js @@ -197,7 +197,7 @@ function formkey() { function bs_trigger(e) { let tooltipTriggerList = [].slice.call(e.querySelectorAll('[data-bs-toggle="tooltip"]')); - tooltipTriggerList.map(function(element){ + tooltipTriggerList.map(function(element) { return bootstrap.Tooltip.getOrCreateInstance(element); }); @@ -446,7 +446,7 @@ function insertText(input, text) { input.setRangeText(text); if (window.chrome !== undefined) - setTimeout(function(){ + setTimeout(function() { input.focus(); for (let i = 0; i < 2; i++) input.setSelectionRange(newPos, newPos); @@ -580,7 +580,7 @@ if (file_upload) { if (file.type.startsWith('image/')) { const fileReader = new FileReader(); fileReader.readAsDataURL(file_upload.files[0]); - fileReader.onload = function () { + fileReader.onload = function() { document.getElementById('image-preview').setAttribute('src', this.result); document.getElementById('image-preview').classList.remove('d-none'); document.getElementById('image-preview').classList.add('mr-2'); @@ -674,18 +674,18 @@ if (screen_width < 768) { object = document if (object) { - object.addEventListener('shown.bs.modal', function (e) { + object.addEventListener('shown.bs.modal', function(e) { const new_href = `${location.href.split('#')[0]}#m-${e.target.id}` history.pushState({}, '', new_href) }); - object.addEventListener('hide.bs.modal', function (e) { + object.addEventListener('hide.bs.modal', function(e) { if (location.hash == `#m-${e.target.id}`) { history.back(); } }); - addEventListener('hashchange', function () { + addEventListener('hashchange', function() { if (!location.hash.startsWith("#m-")) { const curr_modal = bootstrap.Modal.getInstance(document.getElementsByClassName('show')[0]) if (curr_modal) curr_modal.hide() diff --git a/files/assets/js/emoji_modal/emoji_modal.js b/files/assets/js/emoji_modal/emoji_modal.js index 7ec56ac59..e2737404d 100644 --- a/files/assets/js/emoji_modal/emoji_modal.js +++ b/files/assets/js/emoji_modal/emoji_modal.js @@ -47,7 +47,7 @@ let emojiSearcher = { work: async function work() { this.working = true; - while(this.queries.length > 0) + while (this.queries.length > 0) { const startTime = Date.now(); @@ -289,7 +289,7 @@ function openEmojiModal(t, inputTargetIDName) } } -document.getElementById('emojiModal').addEventListener('shown.bs.modal', function () { +document.getElementById('emojiModal').addEventListener('shown.bs.modal', function() { focusSearchBar(emojiSearchBarDOM); setTimeout(() => { focusSearchBar(emojiSearchBarDOM); diff --git a/files/assets/js/fireworks.js b/files/assets/js/fireworks.js index a8f98e267..e61a5f33f 100644 --- a/files/assets/js/fireworks.js +++ b/files/assets/js/fireworks.js @@ -30,7 +30,7 @@ function execute_fireworks(firework) { let counter = 0 -for (let firework of document.getElementsByClassName("firework")){ +for (let firework of document.getElementsByClassName("firework")) { const timeout = 2000 * counter counter++ setTimeout(() => { diff --git a/files/assets/js/flash.js b/files/assets/js/flash.js index b290e186f..2ec04ed17 100644 --- a/files/assets/js/flash.js +++ b/files/assets/js/flash.js @@ -6,16 +6,16 @@ let notifs = 0 let focused = true let alert = true; -addEventListener('blur', function(){ +addEventListener('blur', function() { focused = false }) -addEventListener('focus', function(){ +addEventListener('focus', function() { focused = true }) -function flash(){ +function flash() { let title = document.getElementsByTagName('title')[0] - if (notifs >= 1 && !focused){ + if (notifs >= 1 && !focused) { title.innerHTML = `[+${notifs}] ${page_title}` if (alert) { icon.href = `${SITE_FULL_IMAGES}/i/${SITE_NAME}/alert.ico?x=3009` diff --git a/files/assets/js/gif_modal.js b/files/assets/js/gif_modal.js index 6c0dbbdfb..db9524ac5 100644 --- a/files/assets/js/gif_modal.js +++ b/files/assets/js/gif_modal.js @@ -4,14 +4,14 @@ const container = document.getElementById('GIFs'); let commentFormID; -function insertGIF(url) { +function insertGif (url) { const commentBox = document.getElementById(commentFormID); insertText(commentBox, url) } const gifModal = document.getElementById('gifModal') -gifModal.addEventListener('shown.bs.modal', function () { +gifModal.addEventListener('shown.bs.modal', function() { focusSearchBar(gifSearchBar); setTimeout(() => { focusSearchBar(gifSearchBar); @@ -137,7 +137,7 @@ async function searchGifs(searchTerm) { const giphy = document.getElementsByClassName('giphy') for (const element of giphy) { - element.addEventListener('click', () => {insertGIF(element.src)}); + element.addEventListener('click', () => {insertGif (element.src)}); } } else { diff --git a/files/assets/js/lottery.js b/files/assets/js/lottery.js index 366866454..766526cf9 100644 --- a/files/assets/js/lottery.js +++ b/files/assets/js/lottery.js @@ -1,5 +1,5 @@ let purchaseQuantity = 1; -const lotteryOnReady = function () { +const lotteryOnReady = function() { checkLotteryStats(); // Show ticket being pulled. diff --git a/files/assets/js/markdown.js b/files/assets/js/markdown.js index ed8b57663..0c5a06a9d 100644 --- a/files/assets/js/markdown.js +++ b/files/assets/js/markdown.js @@ -3,14 +3,14 @@ marked.use({ { name: 'mention', level: 'inline', - start: function(src){ + start: function(src) { const match = src.match(/@[\w-]{1,30}/); return match != null ? match.index : -1; }, tokenizer: function(src) { const rule = /^@[\w-]{1,30}/; const match = rule.exec(src); - if (match){ + if (match) { return { type: 'mention', raw: match[0], @@ -27,14 +27,14 @@ marked.use({ { name: 'group_mention', level: 'inline', - start: function(src){ + start: function(src) { const match = src.match(/![\w-]{3,25}/); return match != null ? match.index : -1; }, tokenizer: function(src) { const rule = /^![\w-]{3,25}/; const match = rule.exec(src); - if (match){ + if (match) { return { type: 'group_mention', raw: match[0], @@ -51,14 +51,14 @@ marked.use({ { name: 'underscore', level: 'inline', - start: function(src){ + start: function(src) { const match = src.match(/_/); return match != null ? match.index : -1; }, tokenizer: function(src) { const rule = /^_/; const match = rule.exec(src); - if (match){ + if (match) { return { type: 'underscore', raw: match[0], @@ -104,7 +104,7 @@ const findAllEmojiEndings = (word) => { let hasReachedNonModifer = false; let currWord = word; const currEndings = []; - while(!hasReachedNonModifer) { + while (!hasReachedNonModifer) { if (currWord.endsWith('pat')) { if (currEndings.indexOf(MODIFIERS.PAT) !== -1) { hasReachedNonModifer = true; @@ -178,7 +178,7 @@ function markdown(t) { { if (!window.onbeforeunload) { - window.onbeforeunload = function (e) { + window.onbeforeunload = function(e) { e = e || window.event; if (e) { e.returnValue = 'Any string'; @@ -198,7 +198,7 @@ function markdown(t) { input = input.replace(/((\s|^)[0-9]+)\. /g, '$1\\. ') const emojis = Array.from(input.matchAll(/:([a-z0-9_\-!#@]{1,72}):(?![^`]*`)/gi)) - for (i = 0; i < emojis.length; i++){ + for (i = 0; i < emojis.length; i++) { const old = emojis[i][0]; if (old.includes('marseyrandom')) continue; @@ -259,8 +259,8 @@ function markdown(t) { } let options = Array.from(input.matchAll(/\$\$([^\$\n]+)\$\$(?![^`]*`)/gi)) - if (options != null){ - for (i = 0; i < options.length; i++){ + if (options != null) { + for (i = 0; i < options.length; i++) { const option = options[i][0]; const option2 = option.replace(/\$\$/g, '').replace(/\n/g, '') input = input.replace(option, `
0 votes
`); @@ -268,8 +268,8 @@ function markdown(t) { } options = Array.from(input.matchAll(/&&([^&\n]+)&&(?![^`]*`)/gi)) - if (options != null){ - for (i = 0; i < options.length; i++){ + if (options != null) { + for (i = 0; i < options.length; i++) { const option = options[i][0]; const option2 = option.replace(/&&/g, '').replace(/\n/g, '') input = input.replace(option, `
`); @@ -291,7 +291,7 @@ function markdown(t) { } const fileReader = new FileReader(); fileReader.readAsDataURL(file); - fileReader.onload = function () { + fileReader.onload = function() { input = input.replace(`[${file.name}]`, ``) counter += 1 if (counter == files.length) @@ -317,7 +317,7 @@ function charLimit(form, text) { if (length >= maxLength) { text.style.color = "#E53E3E"; } - else if (length >= maxLength * .72){ + else if (length >= maxLength * .72) { text.style.color = "#FFC107"; } else { diff --git a/files/assets/js/mobile_navigation_bar.js b/files/assets/js/mobile_navigation_bar.js index 34b2a195f..c64bc3a2e 100644 --- a/files/assets/js/mobile_navigation_bar.js +++ b/files/assets/js/mobile_navigation_bar.js @@ -1,5 +1,5 @@ let prevScrollpos = window.pageYOffset; -window.onscroll = function () { +window.onscroll = function() { const currentScrollPos = window.pageYOffset; const topBar = document.getElementById("fixed-bar-mobile"); diff --git a/files/assets/js/more_comments.js b/files/assets/js/more_comments.js index e0f008b43..81780a098 100644 --- a/files/assets/js/more_comments.js +++ b/files/assets/js/more_comments.js @@ -8,7 +8,7 @@ function more_comments(cid, sort) { const xhr = new XMLHttpRequest(); xhr.open("get", `/more_comments/${cid}`); xhr.setRequestHeader('xhr', 'xhr'); - xhr.onload=function(){ + 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, '').replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`); diff --git a/files/assets/js/orgy_file.js b/files/assets/js/orgy_file.js index d274da729..3ebb3fa67 100644 --- a/files/assets/js/orgy_file.js +++ b/files/assets/js/orgy_file.js @@ -28,14 +28,14 @@ orgy_file.addEventListener('pause', () => { add_playing_listener() }) -orgy_file.addEventListener("timeupdate", function(){ +orgy_file.addEventListener("timeupdate", function() { if (break_file.dataset.run == "False" && parseInt(orgy_file.currentTime) == 3000) { break_file.dataset.run = "True" orgy_file.pause(); orgy_file.classList.add('d-none'); break_file.classList.remove('d-none'); break_file.play() - setTimeout(function () { + setTimeout(function() { break_file.pause() break_file.classList.add('d-none'); orgy_file.classList.remove('d-none'); @@ -45,7 +45,7 @@ orgy_file.addEventListener("timeupdate", function(){ } }); -orgy_file.addEventListener("ended", function(){ +orgy_file.addEventListener("ended", function() { location.reload() }); diff --git a/files/assets/js/register_service_worker.js b/files/assets/js/register_service_worker.js index 3af9eb1ed..aa8dc58e5 100644 --- a/files/assets/js/register_service_worker.js +++ b/files/assets/js/register_service_worker.js @@ -25,7 +25,7 @@ function subscribeUser(swRegistration, applicationServerPublicKey, apiEndpoint) }); } -function registerServiceWorker(serviceWorkerUrl, applicationServerPublicKey, apiEndpoint){ +function registerServiceWorker(serviceWorkerUrl, applicationServerPublicKey, apiEndpoint) { let swRegistration = null; if ('serviceWorker' in navigator && 'PushManager' in window) { navigator.serviceWorker.register(serviceWorkerUrl) diff --git a/files/assets/js/settings_profile.js b/files/assets/js/settings_profile.js index 898a29552..1e0e4e32f 100644 --- a/files/assets/js/settings_profile.js +++ b/files/assets/js/settings_profile.js @@ -8,7 +8,7 @@ function post(url) { xhr.send(form); }; -function updatebgselection(){ +function updatebgselection() { const bgselector = document.getElementById("backgroundSelector"); const backgrounds = [ { diff --git a/files/assets/js/settings_security.js b/files/assets/js/settings_security.js index 6a0778e87..00088c8f9 100644 --- a/files/assets/js/settings_security.js +++ b/files/assets/js/settings_security.js @@ -1,4 +1,4 @@ -document.getElementById('new_email').addEventListener('input', function () { +document.getElementById('new_email').addEventListener('input', function() { document.getElementById("email-password").classList.remove("d-none"); document.getElementById("email-password-label").classList.remove("d-none"); document.getElementById("emailpasswordRequired").classList.remove("d-none"); diff --git a/files/assets/js/signup.js b/files/assets/js/signup.js index b49811b3c..5ae7a41b5 100644 --- a/files/assets/js/signup.js +++ b/files/assets/js/signup.js @@ -1,4 +1,4 @@ -document.getElementById('password-register').addEventListener('input', function () { +document.getElementById('password-register').addEventListener('input', function() { const charCount = document.getElementById("password-register").value; const id = document.getElementById("passwordHelpRegister"); @@ -13,7 +13,7 @@ document.getElementById('password-register').addEventListener('input', function } }); -document.getElementById('username-register').addEventListener('input', function () { +document.getElementById('username-register').addEventListener('input', function() { const userName = document.getElementById("username-register").value; const id = document.getElementById("usernameHelpRegister"); diff --git a/files/assets/js/submit.js b/files/assets/js/submit.js index 1f3152f4e..1218bee75 100644 --- a/files/assets/js/submit.js +++ b/files/assets/js/submit.js @@ -132,7 +132,7 @@ function checkRepost() { form.append("url", url); form.append("formkey", formkey()); - xhr.onload=function(){ + xhr.onload=function() { try {data = JSON.parse(xhr.response)} catch(e) {console.error(e)} diff --git a/files/assets/js/view_more.js b/files/assets/js/view_more.js index 1f7601c12..5c789ea29 100644 --- a/files/assets/js/view_more.js +++ b/files/assets/js/view_more.js @@ -7,7 +7,7 @@ function view_more(t, pid, sort, offset) { ids = t.dataset.ids.replace(/[\[\] ]/g, '') xhr.open("get", `/view_more/${pid}/${sort}/${offset}?ids=${ids}`); xhr.setRequestHeader('xhr', 'xhr'); - xhr.onload=function(){ + 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, '').replace(/data-nonce=".*?"/g, `data-nonce="${nonce}"`);