Category "javascript"

Issues with loading consecutive files on 3js

I am trying to create a 3d model viewing website for various student projects. Currently pulling from the 3js library to reference OBJs and MTLs on server. The

Is there a way to use configService in App.Module.ts?

I am building RESTful service with NestJs, I have followed the example to build configurations for different environments. It works well for most code. However

Copy images from secured website to word (or other applications)

When you copy some HTML from a website that contains image tags and that image tags sources require authentication, the paste into another application that does

How to import via a URL using ES modules?

I want to import a library like axios directly from a URL and use it. I don't want to add it as a script which adds axios to the window object (as shown below).

How to disable an event listener in mapbox?

I am trying to have control over event listeners over a layer with Mapbox on React. map.off is supossed to do the trick, but it is not removing the onclick even

Split string of possibly adjacent elements of unknown length by type in JS

Given a string (actually a svg path) such as: "M72 0v754h405v-86h-311v-211h302v-86h-302v-285h311v-86h-405z" I want to obtain an array where each element is eit

Credentials: 'include' not including Cookie header

I'm using credentials: 'include' and mode: 'cors' on the client. On the server I see access-control-allow-credentials: true and access-control-allow-origin: htt

How to add background color to the test in webpage?

I found some text in webpage using below code document.body.innerText.indexOf('tested') document.body.innerText.includes('tested') after finding the text I wan

Play sound on hover

I want to play a sound when the cursor hits an image. I tried to use javascript. the <audio>-tag is working, when I say <audio autoplay> the soundfi

React Router 6 in Electron - No routes matched location

I am trying to use react-router v6 in an electron js application. but it doesn't work for me. This App works correctly without implementing the react-router! Wh

Dynamically Position an Element on webpage

I am trying to use a Emoji picker inside my React application and there are 2 buttons on the page to toggle the picker, I want to show the picker at the positio

How to find MIME type of IPFS (no extension given) using Javascript?

If I have an IPFS CID address (with no extension), of a file like this for instance https://ipfs.infura.io/ipfs/QmNhq4hx1KfTw1a5pTtudGXm9Q4xhWdeuWtPSSG19SSZeU ,

how to prevent force dark mode by system?

Dark/Light mode toggle settings on websites and app are tredning and there is a some system default theme mode also available like chrome dev-tools provide forc

How to transform the word Gr\u008Egoire to it's normal form in Javascript?

Hope you are doing well! I have a list of french names with accents, but I receive them encoded like "Gr\u008Egoire", but I want to display the real word. Thank

How do I make a striped v-data-table in Vuetify?

I have a table <v-data-table :headers="headers" :items="bookings" class="elevation-1" :search="search" > <template slot="items" slot-scope="p

Replace Text into an existing PDF document in a specific positions in JavaScript & Asp.net MVC?

I have an existing 20-page pdf file. I need to extract data from our database and incorporate it into a pdf document for specific positions. I did research on G

Clicking a text is not expanding table

I am having problem in my JS code. I tried much but was unable to solve it. The problem is that i have a dashboard which have multiple pages. We can switch from

How to remove empty query params using URLSearchParams?

I was working with query params, and got introduced to URLSearchParams. I am using it to form this kind of object to query, const x = { a: 'hello World' b:

How to "mask" an input to show brazilian currency

I need a input range shows the value formatted for Brazilian money. By logic, it would suffice to receive this number in a function that would format it and the

Is there a way to "npm init" an ES module?

All modern versions of Node need to run packages as modules is "type": "module" in package.json, but I don't see any flags for npm init or yarn init that will a