Questions tagged [javascript]
JavaScript is a versatile, high-level programming language. It is the programming language in all browsers.and can be used for back-end programming with node.js. Use this tag for questions regarding vanilla JavaScript; optionally tagged with an ECMAScript version. If you are using a preprocessor such as TypeScript please tag with that too.
9,399 questions
1
vote
0
answers
54
views
HTML Editor: Online HTML Editor with Real-Time Preview (version 6)
Overview
HTML Editor is a web-based HTML editor designed for web developers, designers, and learners. It offers a lightweight, minimalist environment for writing and previewing HTML, CSS, and ...
-3
votes
0
answers
34
views
Telegram Technical Support bot [closed]
After turning on the bot for the first time and entering the /start command, it starts spamming the welcome message and does not respond to other commands.
...
3
votes
1
answer
149
views
Bulk Text Replacer
I have created a simple text editor with a "replace all" feature. It's meant to be part of a larger project, so it needs to be robust and work reliably across various scenarios. Please ...
0
votes
0
answers
38
views
Sandboxed, block scope for evaluating user code
I'm working on a modeling app and want to provide block scope for evaluation of user entered code. I'm assuming that the user is not malicious, but error prone, like all of us. At the same time, I ...
5
votes
1
answer
242
views
Parsing Markdown with bare hyperlinks: Hoping to find a way to workaround the "noscript" workaround
The following example shows how to use markdown-it to parse and render Markdown.
It works, but there is a dirty trick there, which I absolutely don't like: to ...
1
vote
1
answer
65
views
React component
The code makes unnecessary API calls because there are two useEffect hooks that both fetch data. The first useEffect runs on mount and fetches data for page 1, while the second useEffect runs whenever ...
4
votes
1
answer
114
views
Checking that GEE code correctly computing distance to nearest bright pixel using tiff data
I'm using Google Earth Engine (GEE) to calculate the Euclidean distance from sample points to the nearest brightest pixel above the threshold value "avg_rad > 10" in nighttime light data. ...
4
votes
2
answers
71
views
better-SQLite3 and JS/Next.js - updating data using "transaction"- shorter / better code?
I am pretty new to SQL databases and in particular to the better-SQLite3 database. I have managed to insert, update, and delete data in a way I desire. All of it running in the background of a self-...
1
vote
1
answer
69
views
Pomodoro timer with notification popup [closed]
I have this code that I feel like could be done more efficiently; is there any way i could fix it?
I'm trying to make a pomodoro timer with html,css and javascript and i want to add popup ...
6
votes
1
answer
136
views
Dynamic image gallery with filters pulling from a JSON file
I have an image gallery of old internet banner ads that pulls URLs and metadata from a JSON file and then displays them based on a set of user-selectable filters. The filters can show/exclude images ...
5
votes
2
answers
153
views
Tags selector in plain JavaScript, without using any plugin
I have made a "tags selector" in plain JavaScript, without using any plugin.
...
6
votes
3
answers
786
views
Collision detection of two rects with rounded borders
I wrote an algorithm how to detect the collision detection of two rects with rounded borders (the code was written using TypeScript but I tried to name things as clear as possible to code be readable ...
8
votes
1
answer
179
views
Automatically trim spaces and remove special characters in HTML forms
We have a web-based customer management application. When copy-and-pasting data into our application, users sometimes enter leading or trailing spaces or special characters (tabs, or even control ...
5
votes
1
answer
147
views
Simple autoplay JS slider advice
I made a simple vanilla JS slider for a recruitment task. It works well, but I would be a lot calmer if someone could review it or push me in the better direction. Task is to create a banner with ...
4
votes
0
answers
60
views
Vue 2 to 3 upgrade: checkbox form field component
I have a checkbox form question component I made in Vue 2, and I'm migrating to Vue 3 so want to simplify it as much as possible and make sure I've taken advantage of all the new feature of Vue 3.
...