Category "javascript"

Extract color palette of a webpage [closed]

I intend to recolor a website with a new palette of colors. I plan to first extract the colors from the webpage and determine its color palett

How print a loop inside of sweet alert window

I want to loop an array and show the result using sweet alert, I am new in this so I try the code below, but show me some like [object],[object] swal({ conte

Appending .js extension on relative import statements during Typescript compilation (ES6 modules)

This seems to be a trivial problem, but it is not very obvious what settings/configurations need to be used to solve this issue. Here are the Hello World progra

Is there a way to make a "cooldown" to your function?

im currently making a diashow or a slideshow for an website. And everything is set up except one thing. The user is able to spam the slideshow thus resulting in

Is there a way to make a "cooldown" to your function?

im currently making a diashow or a slideshow for an website. And everything is set up except one thing. The user is able to spam the slideshow thus resulting in

What is the "module" package.json field for?

I've seen some npm packages (vue for example) have a module field in their package.json. But module is not included in the package.json documentation - is this

JS file gets a net::ERR_ABORTED 404 (Not Found)

I am trying to create a simple Io-web-chat. I recently wanted to seperate my <script> inside my html file to an external js file. this is my very simple

How do I connect to the Admanager API with Javascript? [closed]

I would like to connect to the Admanager and bring my reports but I have not been successful. An example of how to do it would be helpful.

HighStocks series does not show line on Black Colors

let code = Math.floor(Math.random() * 16777215).toString(16); if (code === "000000" || code === "ac132") { code = Math.f

lodash dynamic filter with multicheck

I have a Multi check. I need a filter show with one option, two options, or three options. This is the option: The component has an array. The array is dynamic

Fix warning Hotjar not launching due to suspicious userAgent

While running the mobile friendly test I ran into this JavaScript console warning message: Hotjar not launching due to suspicious userAgent: Mozilla/5.0 (Linux;

react useEffect comparing objects

I am using react useEffect hooks and checking if an object has changed and only then run the hook again. My code looks like this. const useExample = (apiOptio

Elegantly calculate the minimum and maximum of a number array simultaneously

In Javascript, given a simple number[] array, is there an elegant way to calculate the minimum and maximum values simultaneously, or return undefined if the arr

array indexOf with objects?

I know we can match array values with indexOf in JavaScript. If it matches it wont return -1. var test = [ 1, 2, 3 ] // Returns 2 test.indexOf(3); Is th

How can I use React Material UI's transition components to animate adding an item to a list?

I have this class. class Demo extends React.Component { constructor(props) { super(props); this.state = { items: [] }; this.add = this

I want to import bootstrap js and jquery js file in astro js

I tried ES imports statements and normal script tag to import the required JS file and CSS file for bootstrap in astro js project I am getting this Issue. Erro

Uncaught TypeError: Cannot read properties of undefined (reading 'extend') after upgrade vue to 3.x

Today I upgrade my google chrome extension vue version to 3.x, when run the app, the google chrome extension popup console shows error like this: commons1.js:13

Mongoose.js not removing object from array

I'm using Mongoose with my Discord bot and I'm making the feature where the infractions can be removed from any mentioned user(s). The infractions are saved in

Cannot create property 'ignore_whitespace' on string ' '

const Validator = require("validator"); const isEmpty = require("../validation/is-empty"); module.exports = function validateRegisterInput(data) { let errors

Is it possible to create tables within Angular ts files?

So I have an array which holds different categories to compare different companies. Depending on the user selection there may be 3 categories or 10 to display.