I am injecting a JS file and CSS when a checkbox in popup.html is checked. This works. The script loops through all the img elements on the page and positions a DIV with a class under each image: Injected JS If the checkbox is unchecked the style sheet is removed. I also want to remove the injected DIV. If I
Tag: google-chrome
Text flows out of input after next event is fired if input is focued
While building a basic application, when I click a button, the text inside my currently focused input overflows only in Chrome. However, that text can be accessed using (right) arrow key(s). Is there any way to avoid this? I tried clipboard copy-paste but that did not work. Live site: https://kaustubhmaladkar.github.io/Tip-Calculator/ Code on Github: https://github.com/KaustubhMaladkar/Tip-Calculator/ Answer The problem comes from this
How to create a module worker in javascript
I am working on a program that relies heavily on web workers. But I am unable to get them to function as required. This is just a minified example but the format is more or less similar. I have 4 files: index.html index.js worker.js hello.js The worker should output “Worker Started”. When the button is clicked, the UI thread will
Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/html”
I deployed my angular application(Static webpage) on kubernetes and tried launching it from Google Chrome. I see app is loading, however there is nothing displayed on the browser. Upon checking on browser console , I could see this error “Failed to load module script: Expected a JavaScript module script but the server responded with a MIME type of “text/html”. Strict
Chrome asks if an application should be opened
We have a website that allows the user to download and open a Word file. Chrome started recently opening an annoying popup when the users downloads the Word The javascript code called to open the file is Is there some solution to tell Chrome to always open that kind of links? It is annoying our users, that need to frequently
Would calling Performance API frequently be causing a performance issue?
I want to measure the memory usage of my web SPA using performance.memory, and the purpose is to detect if there is any problem i.e. memory leak during the webapp’s lifetime. For this reason I would need to call this API for specific time interval – it could be every 3 second, every 30 second, or every 1 minute, …
getBoundingClientRect() returns inaccurate values for complex SVG’s in Chrome
I’m trying to calculate the bounding box of transformed SVG elements and for that I’m using getBoundingClientRect() and mapping the x and y values to SVG coordinates. However, this function seems to produce wrong outputs in Chrome and Edge when the shape has curves and a rotation. In the other hand, Firefox is able to produce the expected result. Here’s
Manifest v3 inject script from popup.js
In manifest v2 this code worked and injected the script when button was clicked: popup.js v2 (works) Now in manifest v3, chrome.tabs.executeScript is replaced with chrome.scripting.executeScript. scripting permission is added in manifest.json. popup.js v3 (not working) The problem is that chrome.tabs.executeScript requires tabId value as one of the parameters. How can I get tabId value in popup.js or convert the
browser only downloads 10 images at once (JS) [closed]
Closed. This question needs debugging details. It is not currently accepting answers. Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question. Closed 1 year ago. Improve this question there is a limit of downloads that can be done at the same
How to test if Workbox precaching is working
My question is very similar to this question. I’m wondering how I can verify in Google Chrome whether the service worker of my progressive web app is serving precached files from the cache instead of the network. I have a service worker in place which uses following Workbox code to precache some files: I can verify that those files are