Category "javascript"

Defining multiple encrypted parameters

I have encrypted parameters in my url, for example: Encrypted example.com/?auth= *****"encrypted data here including other parameters like &username=hellowo

Magento 2 cms backend javascript error Uncaught SyntaxError: Invalid or unexpected token

Suddenly I am having javascript error and cannot edit any cms page (cms/page/edit/page_id/45) or block. I have been trying to solve this for the past week with

Retrieve the deals from Hubspot using its APIs

I'm trying to integrate the Hubspot Deals to Google spreadsheets, I'm following a tutorial https://medium.com/how-to-lean-startup/create-a-hubspot-custom-dashbo

MongoClient not connected error while trying to use Mongoose?

As part of my course I'm learning mongodb and now Mongoose. I've written the code exactly as done in the lesson but when trying to start it with node app.js I g

How can I get firebase realtime data using unique id

I'm using react js and firebase. I have this code below. I'm using it to get data from another table. const uniqueEventID = Object.keys(data).map((id) => aa

Youtube cookies auto accept with puppeteer

Im trying to find something can automatically accept or delete youtube cookies with puppeteer when i load "youtube.com" Example of popup you can get in private

ReferenceError: window is not defined, consider using the "jsdom" test environment (jest V28)

I would like some assistance in resolving this error. Am using Jest V28.0.0. Here's how my package.json's test script & devDependencies look like "scri

Can I change the state for given time and then revert it back to the original state using settimeout

I want to get the value to true for one second, after which it will revert back to false using settimeout but stuck. Here is my code: const [value, setValue] =

Can the Javascript Use-API be used to set properties

In AEM we can use the Javascript Use-API to access properties and perform some actions on them. In this example we can see that we use properties.get to retriev

Pending promises even though awaiting Promise.all()

I'm having difficulty understanding why I still have pending promises after awaiting Promise.all(). In the example below, I'm creating an array of promises by c

RegExp Match all text parts except given words

I have a text and I need to match all text parts except given words with regexp For example if text is ' Something went wrong and I could not do any

How add VueJS event listenner on a component in the mounted section

I important a componant and I want to attach an event listenner to the button element which has the class qkb-bubble-btn. I understand the fact I should put thi

Apply style to images before they are loaded

Particularly I am interested in applying style for images and background images. The style is injected with a CSS class into the page from a chrome extension. I

Change multiple Fullcalender Day Cell Backgrounds from external Data specified in Database Table

Im trying to change the fullcalendar (v3) day cell background-color for specific days declared in a databse table. So far i was able to try it with manual input

how to center modal and have it come underneath the link button?

I have a front page that has 4 links, and each link is suppose to open up a modal. However for instance on the first link 'Vente' in my code the modal only come

How can i await for file to upload so i can upload next image with params

I am using Drag and Drop file to upload multiple images. ngx-file-drop How to use with async await to upload images because i want to send params to next image

get the variable $i from counter in text

I just don't know how to make this work. I got this Javascript $(".email").on("keyup change", function() { if ($(this).val().match(/@gmail/i)){ $(".groupa").sho

Duplicate Encoder JavaScript, try to use indexOf but the output is still incorect

convert a string to a new string where each character in the new string is "(" if that character appears only once in the original string, or ")" if that charac

Find nth week recurrence on week days with moment js

I have just started moment js, I'm trying to generate recurrence for every nth week for defined week days I have tried this code so far but not getting True for

Remove the values from array1 by referring to array2

I have two arrays and I want to remove the values from array1 by referring to array2. The expected result is ["b", "c",]; array1 = ["aa", "bb", "b", "c",]; ar