Category "javascript"

"Navigation is Blocked" message on Chrome 99 / Android devices

I am managing some payment pages now. Some online mall creates an Iframe and call our payment page. When I click button with Chrome 99 on Android devices, "Navi

App Script Array Push() in loop Optimization

I'm looking to improve my array push inside loops but I noticed that every time my function is being called (in a loop manner) and executing this lines of code,

How to override js method in Odoo 15?

Can anyone give me minimal code so that any method I can override for JS method? changeMode(mode) { if (!this.hasPriceControlRights && mode ===

Javascript works in codepen but not on browser

const toggleButton = document.getElementsByClassName('navbar-toggle')[0]; const navbarLinks = document.getElementsByClassName('navbar-links'); toggleButton.

React useCallback() not working as expected

I'm trying to understand useCallback() a bit better by creating a simple React app and playing around with it. I tried wrapping handleClick function in useCallb

Take full screenshot in Chrome

I developed a little chrome extension, which takes a screenshot from the current page. The Problem is, when a part of the current area is covered by e.g. the in

React Native update component

I'm pretty new to react-native. When I click the stop sleep or info button I send patch requests to the users.json file to change the status. My JSON file conta

Display text (flexbox) when hover over image

I want to hover over the rotating circle to display the 4 "about" texts. But the issue is that I am using flexbox and when I enter the cursor into the area cove

"Uncaught SyntaxError: Cannot use import statement outside a module" when importing ECMAScript 6

I'm using ArcGIS JSAPI 4.12 and wish to use Spatial Illusions to draw military symbols on a map. When I add milsymbol.js to the script, the console returns err

Convert a string to number with parseInt does not work as expected [duplicate]

A quick maybe simple question : We are trying to parse a string into number , the sample number is "1928433000460244141" so when we try to par

cloud function triggering delay and retry

I have a firebase trigger function with failurePolicy: true (the function will automatically retry if fails). I avoid infinite retry loops as described here : h

I am not able to implement recordrtc

I am not able implement recordrtc. I took the following code from the site: https://medium.com/@coolchoudharyvijay/use-mic-in-angular-to-record-audio-simplified

Apollo-Server display errors in a clean mannor

I'm pretty sure that the question is self explanatory. I'm using 'apollo-server-core' 3.6.5 Errors I want to get { "errors": [ { "messa

Javascript window.load events not triggering without using setTimeout

This question pertains to a shopify cart page. I am trying to manipulate a page on load with Javascript. 'DOMContentLoaded' was not reliable enough so I am usin

How to add bootstrap 5 and other global packages to a SvelteKit project?

I installed bootstrap using NPM In a normal svelte project I usualy add bootstrap and other packages, which are used project wide, in the App.ts file. However,

Parsing & Checking Condition Expression in Javascript

I have string that have variable conditions in it, like this: (@IS_VERIFIED = 'True' OR @CONFIRMATION_NEEDED != 'True') AND @REQUEST_LIMIT != '0' This is jus

Javascript + PHP /// read barcode

I want to read a barcode using a library to barcode decoder or read by javascript or PHP? I browse many sources but can't reach find one to read the barcode

Blogger Conditional Tag If a Post has Spesific Label

im trying to Execute some Javascript code like this <b:if cond='data:blog.pageType == "item"'> <script type='text/javascript'> //<![CDATA[

How to re-run multiple functions in JS on button click?

In the snippet below, I'm generating random parts of a URL and that spits out an image from placeimg.com. However, I'm trying to re-run the functions that gener

VirtualizedList: You have a large list that is slow to update - make sure your renderItem function renders

Im working on a react-native project and what I'm trying to do is for the user to have the possibility to select phone numbers in his contact list. When the use