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.

Filter by
Sorted by
Tagged with
0 votes
0 answers
27 views

This is an alternative approach and follow up dealing with this issue Extension messaging uses base::Value (JSON) serialization but could use WebSerializedScriptValue (structured cloning), closely ...
guest271314's user avatar
5 votes
1 answer
124 views

Why I made it I wanted to experiment with javascript: bookmarklets and see how far a small injected script could go on any site by making a simple injectable game. ...
Chip01's user avatar
  • 798
1 vote
0 answers
145 views

Some browsers were not showing text on my webpage in bold so I put some text that was between <span> tags between ...
Baangla Deshi's user avatar
5 votes
1 answer
131 views

I wanted to create a protected member in a javascript (ES) class but, of course, there is no such concept. So I devised a way that would let me create a member or something that "no one could ...
Abet Giron's user avatar
1 vote
0 answers
56 views

Explainer Problem No standardized Web Extension API to send or transfer TypedArrays or ArrayBuffers or ...
guest271314's user avatar
0 votes
0 answers
49 views

References WebSocketStream Explained WebSocketStream API design Source code https://github.com/guest271314/websocket-stream-impl Implementation ...
guest271314's user avatar
1 vote
1 answer
160 views

I created this module to help with the creation of HTML elements: ...
Justin Massey's user avatar
3 votes
0 answers
98 views

I put together this Native Messaging performance test to determine based on evidence which programming language, JavaScript engine or runtime, and WebAssembly compiled code is fastest to round trip 1 ...
guest271314's user avatar
1 vote
0 answers
48 views

Native Messaging host using Mozilla SpiderMonkey JavaScript/WebAssembly engine. Documentations Chrome Developers MDN Web Docs Microsoft Edge Developer documentation Messaging between the app and ...
guest271314's user avatar
6 votes
5 answers
1k views

The goal of the following openprocessing.org JavaScript program is to calculate the sum and difference of a pair of numbers and print the 2 results if they are both positive. I want to do the ...
Will.Octagon.Gibson's user avatar
1 vote
0 answers
44 views

Below is code for a front end calendar event element I have just finished. Though I have been programming in JavaScript for a while, this is the first time I have created a custom class and element, ...
ControlAltDel's user avatar
7 votes
1 answer
97 views

I am new to front end development and thought to recreate the GUI of Fruity Balance just for practice. I would love to hear any advice on best practices. I am also wondering if any improvements could ...
Evr's user avatar
  • 71
0 votes
0 answers
107 views

A branch of a repository I maintain has a function that can do different things based on the input and expected result, and structure of a particular inner function call. I can echo 20 MB to and from ...
guest271314's user avatar
-1 votes
2 answers
144 views

I'm looking for suggestions on how this code structure can be improved. It feels like there's a smarter way. The purpose of the script is to create live stream players if the following conditions are ...
fslap's user avatar
  • 17
2 votes
1 answer
153 views

I wrote this code below to get all possible words for an array containing \$n\$ letters. The logic of the code is that the letters of the array are mixed up in random positions and checks if this ...
John's user avatar
  • 59
6 votes
1 answer
554 views

I’ve implemented a Connect 4 AI in JavaScript using a Negamax search. My goal is to solve the game completely from the starting position (depth 42). I’m trying to make it as fast as possible and would ...
eligolf's user avatar
  • 199
5 votes
1 answer
79 views

This is my first web component. I implement it as an autonomous custom HTML element. I cannot use a customized built-in element because it's not supported by Safari. Nevertheless, as it mainly ...
gouessej's user avatar
  • 151
3 votes
1 answer
99 views

I'm using a Web extension to communicate with an Isolated Web App over externally_connectable for the capability to use Direct Sockets UDP and TCP sockets from ...
guest271314's user avatar
4 votes
3 answers
202 views

I made my first ever JavaScript project. It is a program that calculates the GCD and LCM of 2 numbers that the user inputs. It also stores these 2 numbers in cookies so that they can be accessed for ...
Ana Kullanıcı's user avatar
3 votes
1 answer
108 views

My openprocessing.org JavaScript code listed below produces the output I want but doesn’t seem very elegant to me especially the “.M” in “matrices[mat].M[row][col]”. Any comments to improve the ...
Will.Octagon.Gibson's user avatar
5 votes
1 answer
405 views

I wrote this both to help read (and edit/summarize) my own work, but mainly to be able to get through the mounds of papers I was asked to read as a graduate student. This is a summarization algorithm ...
Charles G's user avatar
  • 103
8 votes
1 answer
548 views

I am fairly new to programming using the site openprocessing.org. My program, available to play online here, is a simple puzzle game in which you slide the circles so that you end up with 4 circles in ...
Will.Octagon.Gibson's user avatar
0 votes
1 answer
170 views

This code parses a series of Uint8Arrays that comprise a Transfer-Encoding: chunked request ...
guest271314's user avatar
3 votes
1 answer
129 views

This is something I've been writing for a paper I'm working on. There is a debate about what is formal text and what is not, but what I know about myself and my writing is that I use certain words (...
Charles G's user avatar
  • 103
2 votes
0 answers
111 views

Following on from my previous question, I would like to know what could be improved here and whether it is now secure. I had to use Java 8 because the Blade lib was built with it, and I want to extend ...
Tobias Grothe's user avatar
4 votes
1 answer
154 views

First of all: I was looking for a simple image captcha solution for a website, but all I found were "Over-the-top" solutions for me. So I decided to write something to self. I mainly use two ...
Tobias Grothe's user avatar
1 vote
1 answer
92 views

A runtime agnostic WebSocket server. Tested with node, deno, bun, ...
guest271314's user avatar
6 votes
3 answers
152 views

When reading a pressure transducer, I'm currently using the following code to apply the "device under test data" from the calibration report. How can I determine which range segment of ...
Lenny Cunningham's user avatar
3 votes
2 answers
186 views

rodde's Pacman clone I have this clone implementation of Pacman. It looks pretty much like the original, yet I had to impose some relaxations as I am not sufficiently masochistic to implement all the ...
coderodde's user avatar
  • 32.3k
4 votes
1 answer
171 views

I am new to programming using the site openprocessing.org. The code given does the following on my iPad: Draw a red circle Wait until I finger tap near the red circle’s center Erase the red circle ...
Will.Octagon.Gibson's user avatar
6 votes
2 answers
155 views

There's been talk about implementing WebRTC Data Channel over WHATWG Streams for a while https://github.com/w3c/webrtc-pc/issues/1732 https://github.com/w3c/webrtc-nv-use-cases/issues/44 https://...
guest271314's user avatar
4 votes
4 answers
281 views

I am working on a blogging application in Laravel 8. I have added "live validation" to the registration form with JavaScript. For password strength, I use Zxcvbn. The registration form ...
Razvan Zamfir's user avatar
2 votes
1 answer
115 views

I developed a chatbot using the Telegraf.js framework. Although the latest version of Telegraf offers TypeScript support, I chose to use JavaScript. I followed a tutorial to deploy it and would like ...
Vilela's user avatar
  • 21
2 votes
1 answer
114 views

The requirement is to split the headers from the request body, most efficiently. Possible approaches I have employed and/or considered Decode to text, match ...
guest271314's user avatar
2 votes
1 answer
237 views

I really don't post a lot on here, but decided to share this because I thought first that it could be helpful and second that it could be improved. In my first versions, It was all javascript, like ...
Charles G's user avatar
  • 103
2 votes
2 answers
155 views

I am trying to manage state in vanilla JavaScript—without using frameworks like React or Vue. I am also not using state management libraries. My requirements are: Reactivity Time Travel (Undo/Redo) ...
Ahmad Ismail's user avatar
1 vote
1 answer
179 views

I'm writing JS for the FreeCodeCamp todo list; the corresponding HTML and CSS for this can be found on their page. I have made one edit to the HTML - the button with type "submit" has been ...
ApexPolenta's user avatar
5 votes
1 answer
70 views

I use the following code to create a call graph from javascript file(s). I generate the output in Graphviz DOT language in order to create visualizations of that graph using the Graphviz command line. ...
Ahmad Ismail's user avatar
3 votes
1 answer
241 views

I am working on a blogging application in Laravel 8. I have put together a way to preview and remove the main article image. In the ArticleController.php controller,...
Razvan Zamfir's user avatar
3 votes
1 answer
343 views

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
  • 197
3 votes
1 answer
177 views

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
  • 197
0 votes
0 answers
62 views

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
267 views

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 ...
jsx97's user avatar
  • 207
1 vote
1 answer
125 views

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
132 views

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
105 views

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-...
godfatherjohn's user avatar
1 vote
1 answer
96 views

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
170 views

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
195 views

I have made a "tags selector" in plain JavaScript, without using any plugin. ...
Razvan Zamfir's user avatar
6 votes
3 answers
867 views

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

1
2 3 4 5
189