I have a site in which all sections take 100vh/vw, and I want to animate the opacity transition when user attempts to scroll up/down. The thing is, the scroll event doesn’t fire because the window hasn’t really scrolled. here’s the codepen, and the gist of it: is this even possible? And if not, any ideas for a workaround? Answer Change
Tag: browser
Using JavaScript in Browser’s Bookmarklet to Edit the URL with Regex
So I know it’s possible to run JavaScript by storing them in the browser’s bookmark (aka. bookmarklet), but I’m not sure if it’s possible to use bookmarklet to auto-edit the current URL (and then bring you to the new URL). What I’m trying to do: In the URL, replace everything before (and including) the string with and remove everything after
How to force browser to abort all XHR requests [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 10 months ago. Improve this question In my website I have a page which sends some XHR requests to
How to debug unknown html + js: How to trace what .js is modding html for a specific class?
I am maintaining a web site that does some magic behavior (well, it adds a few characters that are not in the html) to elements tagged: class=”popupover-host” I can’t find this referenced in the css, and so far don’t see it referenced in any .js In the browser, it is pre rendered, and examining the element shows me the fully
Problem viewing a div with a simple function
I have a problem I would say stupid with html and javascript, a simple function that should make me visible and invisible a div crashes the html making it empty! js: before: after: Answer You don’t have to write pre-defined methods. It works same for all other tech stacks such as Mysql, PHP, etc. Recommend using opens, not open if
How can I check if the browser supports iframe sandboxing?
I have some user-generated HTML and CSS. I think I should show the user sanitized HTML with no CSS or JS if the browser doesn’t support the sandbox property on iframes, which is what’s stopping JS from running and CSS from selecting part of my page. So how can I check if the sandbox attribute is supported? Answer I found
How to fix the TypeError ‘Cannot read property ‘download’ of undefined’ from browser.downloads.download using Puppeteer
I am using puppeteer to login into my account of a content provider I work with and download a lot of zips. I can easily get the array with all the links I need to download then I loop through the array and use browser.downloads.download (code taken from MDN) to download each link. The problem is that even before it
MetaMask does not inject window.ethereum: Uncaught (in promise) TypeError: Cannot read property ‘request’ of undefined
To start, let me mention this is an in-browser project, so i can only use So a few months back I made a dapp, which worked fine even tho I never set a provider, so I guessed it used the ones given by MetaMask. However, i am using the guide here the only issue is the following code, This code
Browser Extension’s creating dynamic buttons with dynamic links
I’m trying to create a browser extension popup (in JS) that creates a number of buttons with links that open up different webpages. The function takes a number of parameters, the main one being b_link which is an array of URL’s to the website. For some reason, only the last URL in array is applied to all of the buttons
Javascript Function Defining Performance on Browsers
Is there any browser performance difference between defining javascript functions before and after DOM loaded? I usually define functions after DOM loaded like this and some people use this way Theory-1: They say Example-1 is slower than Example-2 because Example-1 waited DOM to load then started to define functions and then page became to work in full function. However, in