2,524,087 questions
-3
votes
0
answers
56
views
How to fetch highest quality YouTube thumbnail using JavaScript from video URL? [closed]
I’m working on a small web tool where users can enter a YouTube video URL and get the video thumbnail in the best possible quality.
Right now I’m extracting the video ID and using the standard YouTube ...
Advice
0
votes
3
replies
62
views
How to handle and sanitize user input strings in a web form using JavaScript?
I am working on a web application where users can submit text input through a form. I want to ensure that the input is properly sanitized and stored without causing security issues such as XSS or ...
0
votes
3
answers
54
views
Attach JS eventlistener to layered target
On our landing page we have 'cards' that mention a specific category, along with some specific programs within that category. The goal is to separate clicks on the panel itself from click on the ...
Advice
0
votes
4
replies
61
views
Building a website to convert long videos into engaging and attractive short videos
I don’t have any code to attach, and I know this isn’t a typical technical problem. The real issue is that I don’t even know where to start.
I have a problem and I don’t know how to solve it, so I’m ...
1
vote
1
answer
54
views
How do I return extra properties in abp framework's autocomplete select?
So ABP has a kind of helper to select elements that uses select2 under the hood. I already consulted the docs but didn't find anything. So basically I have a cshtml element that looks like the default ...
0
votes
0
answers
32
views
Connecting a passive display GUI (Tweakpane) to 3d-force-graph
I am working on Vasco Vasturiano’s incredible, indelible 3d-force-graph. I would like to display node attributes in Tweakpane gui (or sidebar, or bounding box), providing info such as description, or ...
1
vote
4
answers
100
views
Automatic setting of button focus in JavaScript
I'm having trouble programming automatic button focus in JavaScript. Let's say we have a very complex application interface and need to restore focus to some buttons after they've been lost. For ...
Advice
0
votes
7
replies
69
views
Add minimum quatitiy function to JavaScript
I found the following JavaScript function for jQuery online:
function wcqib_refresh_quantity_increments() {
jQuery("div.quantity:not(.buttons_added), td.quantity:not(.buttons_added)")....
1
vote
0
answers
73
views
Combining multiple node displays in 3d-force-graph using .nodeThreeObject
I am working on Vasturiano’s (mindblowing, spell-binding) 3d-force-graph, and having trouble combining (and separating) three seemingly very simple elements: a sprite, an image, and image text.
In ...
Tooling
0
votes
9
replies
112
views
99 Bottle of Beer - Javascript ()
I'm new to JavaScript and created the "99 Bottles of Beer"-lyrics in code.
How to make this more professional?
for (var numberOfBottles = 99; numberOfBottles >= 0; numberOfBottles-- ){
...
-2
votes
0
answers
102
views
How to check properties in destructured argument object? [closed]
Checking supplied argument existence is an "every day" operation. For example, in "plain" argument list f(x,y), this can be done with "type of x".
But how to check ...
Best practices
1
vote
2
replies
79
views
How can I validate and pretty-print JSON in JavaScript?
I have a JSON string and I want to:
Validate if it's correct JSON
Format (pretty-print) it for better readability
What is the best way to do this in JavaScript?
Answer:
You can validate and pretty-...
0
votes
1
answer
77
views
How do I make my Jest tests, runnable in Node.js, compatible with Bun if I am using Babel transform from browser into Node.js-compatible JavaScript?
In my project I am using this babel.config.js file to convert from browser-compatible JavaScript into Node.js-compatible JavaScript before running my Jest tests:
module.exports = {
presets: [['@...
Advice
0
votes
8
replies
172
views
Is there any future for a JavaScript developer doing Gen-AI? Every single JD asks for Python — am I wasting my time?
I need to vent — and genuinely want to hear from people who've been in this spot.
I'm a passionate JavaScript developer. JS is not just my job, it's how I think. I've spent months going deep on ...
1
vote
1
answer
102
views
JavaScript fetch stream not working on iOS
I'm trying to read the stream response from my API in iOS (specifically Safari, but seems to be the same issue for any browser on iOS).
The issue appears to be when attempting to read the stream, in ...