I’m using the following code for a progress bar: It works fine (when the page loads, progress bar starts and completes 300frames) but when I switch the tab or minimizes the window it stops and when I reopen the tab, it resumes. I don’t want this top happen. I want the progress bar to continue load…
Tag: html
Display QRCode in HTML (google authenticator)
I made a POST request to get a QRCode Here is the data I get from the response. The preview of the response works fine only I don’t know how to use this data to display it in a tag on my html page for example. Any ideas? Answer It finally works as : (in async function)
error code 401, HTTP Token: Access denied
I am new to using API’s. I’ve been trying to use this API called Carbon Interface. it supposed to give an estimate of your carbon footprint based on how much electricity you use. I created this quick project to test it but whenever I try to use it I get error code 401, I look it up and it’s …
Send website visitor IP when accessing website
I am working on a personal project and I was wondering why not use a kind of ip logger that logs the ip of a visitor and sends it to a Discord webhook. The code works, but only locally. I tried hosting the code on Glitch but i was getting this error in the console: grab.js: index.html: Answer This answer
Unable to make CSS animation centered
I’m working on this CSS animation from Animista which is not centered. The entry animation starts and ends not centered and the exit animation starts in the middle and slides down. Which is not how the animation is supposed to work. The animation is for a popup which gets triggered after a 1-2 seconds a…
CSS change text coloration when disabled by javascript
I used the javascript code for making my inputs disabled. It works, but only for inputs. I would like to change the font color also when my inputs are disabled. My code looks as follows: I put disabled next to my textparagraph class, like they shown here but there is no reaction at all. Is there any chance to…
Native date input ignores CSS
I have a problem with native inputs of type date. My case consists of a native form with multiple native inputs of different types (text, number, date, etc.) The application featuring the form has a sticky header which results in the following behaviour: Whenever the form is submitted and the form validation …
Contents.js blocking page load chrome extension
Hey guys so I’m building an extension but I have a function that is heavy when running and it’s blocking the load of the page and I was wondering if it was possible to only run it after the page is fully loaded and interactive either in the script or in manifest.json? I currently have it inside a …
Image strecting while fit to parent container
I have a image which is stretched. I want image fit to parent container for responsiveness and don’t want to loose aspect ratio of image Sample code to explain logic RegionSelect Component is used to draw bounding box with given coordinates Answer Use a background image. background-size: contain will as…
Remove css class of element
(Django) I have a table that I am attempting to hide if it is empty. I have mostly achieved this the only issue is that the CSS styling is still present after “removing” the table. How do I remove all of the CSS styling for a particular element? code: Answer You can hide whole table, if is empty: