Skip to main content

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.

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 ...
Mori's user avatar
  • 177
-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. ...
Максим Макаров's user avatar
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 ...
Mori's user avatar
  • 177
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 ...
Lowclouds's user avatar
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 ...
john_m's user avatar
  • 227
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 ...
Tomasz Waszczyk's user avatar
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. ...
research_bugz's user avatar
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-...
JoHKa's user avatar
  • 143
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 ...
onsei's user avatar
  • 11
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 ...
fish's user avatar
  • 160
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. ...
Razvan Zamfir's user avatar
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 ...
EzioMercer's user avatar
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 ...
Heinzi's user avatar
  • 733
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 ...
Daniel Wnuk's user avatar
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. ...
Sara's user avatar
  • 41

15 30 50 per page
1
2 3 4 5
627