2,523,237 questions
-3
votes
0
answers
20
views
How to conditionally load a custom JavaScript file only on a specific WordPress page template?
I’m working on a WordPress site and I want to load a small custom JavaScript file only on one specific landing page, not across the entire website.
The page uses a custom template and contains some ...
-2
votes
1
answer
50
views
How to separate a body colliding with two (or more) others given their overlap
I am programming a top-down game where the player is a circle and there are circular and polygonal obstacles that the player can collide with. I am using a Separating Axis Theorem library to help with ...
Advice
0
votes
2
replies
45
views
Remove White Space From Search When Pasting
I am trying to either add a button or automatic white space trimmer to my search bar on submit. For example if I copy and paste numbers, sometimes there are spaces before, this I want to remove ...
Advice
0
votes
4
replies
57
views
interactive SVG on drupal
I created a rather simple interactive illustration with html (an <svg> with four <button>, all inside a <figure>) with a bit of css and js so that when the user clicks the buttons ...
Advice
0
votes
2
replies
48
views
Need an overview of this widget I'm making
I'm very new to Javascript and was making a little DDLC themed widget, I got it working as intended but I worry my inexperience made me end up doing Javascript that's bulky and over complicated and I ...
0
votes
0
answers
50
views
Loading three.js texture from UInt8Array in plugin
I'm trying to implement a three.js texture loader for the JPEG 360 format. For this purpose, its really a JPEG image embedded in a nested set of "boxes", very similar to the structures used ...
Advice
0
votes
3
replies
71
views
How to compare to Dictionary objects in js
I was solving a problem, and Its important to compare both dictionary, but js doesn't support it I cant use operator like this == or === to compare 2 objects, how can I do that without using any ...
Best practices
0
votes
2
replies
48
views
How to "sync" Prisma with sessions?
I have a node js code that authenticates with cookies and sessions:
import express from "express";
import session from "express-session";
import postgreSession from "connect-...
0
votes
0
answers
45
views
Fresh Next.js install throws createClientModuleProxy / buildId errors [closed]
Fresh Next.js install throws createClientModuleProxy / deploymentId / buildId errors on Node.js v24
I created a fresh Next.js app using:
npx create-next-app@latest my-app
Then I ran:
npm run dev
...
1
vote
1
answer
107
views
Error sending HTML form data with JavaScript front end through Flask backend to MySQL database [closed]
I get the error "400 (BAD REQUEST)" in the browser (dev tools) console when trying to send HTML form data with JS frontend to MySQL database through a flask back end.
HTML form:
<form id=&...
0
votes
1
answer
96
views
Closures with Async functions
so I saw that closures (aka functions that return whole functions) are a neat way to have a function keep variables without needing to pollute globals too much, now the problem is that when I try this ...
0
votes
0
answers
82
views
highlighting text in abc when clicking on rendered music
I've implemented a simple abc editor using Paul Rosen's abc-basic.js with the ability to transpose the key in the rendered output. I've used the excellent example at https://examples.abcjs.net/editor-...
-2
votes
1
answer
73
views
How I use the value of LocalStorage in other .js [closed]
Im doing a HTML forms and I dont know how to take the value of LocalStorage.
I dont know how to use it in other .js, adding the code:
let descripcion = document.getElementById("descripcion")
...
-8
votes
0
answers
86
views
How to handle asynchronous JSON schema parsing changes from a dynamic sports API endpoint in JavaScript? [duplicate]
I am developing a client-side web application that needs to fetch live sports telemetry directly from an infrastructure pipeline hosted on a custom domain.
When I make an asynchronous GET request to ...
1
vote
1
answer
61
views
Disable custom button in the fc-header-toolbar with 'disable' in stead of CSS
We have defined a custombutton which is diabled \enabled on a certain value. This is working so far:
I'm working with Vue.
const updateMyCustomButton = async (): Promise<void> => {
await ...
