I'm making an extension that will put a button under each video on the home page but I found out very quickly that this wouldn't be possible by just using a selectAll statement. The only thing that a selectAll statement does is it retrieves the first 3 rows of videos on the homepage. I think what's happening is there are videos being loaded after the page has loaded thus the elements don't exist at "document_end"(this being when my chrome extension is injecting the js/css onto the page). I would be looking for something like an event listener but an explanation as to why this is happening would be appreciated as well.
How does YouTube's dynamic loading on the homepage work?
184 Views Asked by Peter At
1
There are 1 best solutions below
Related Questions in JAVASCRIPT
- Using Puppeteer to scrape a public API only when the data changes
- inline SVG text (js)
- An array of images and a for loop display the buttons. How to assign each button to open its own block by name?
- Storing the preferred font-size in localStorage
- Simple movie API request not showing up in the console log
- Authenticate Flask rest API
- Deploying sveltekit app with gunjs on vercel throws cannot find module './lib/text-encoding'
- How to request administrator rights?
- mp4 embedded videos within github pages website not loading
- Scrimba tutorial was working, suddenly stopped even trying the default
- In Datatables, start value resets to 0, when column sorting
- How do I link two models in mongoose?
- parameter values only being sent to certain columns in google sheet?
- Run main several times of wasm in browser
- Variable inside a Variable, not updating
Related Questions in GOOGLE-CHROME-EXTENSION
- How to send data from content.js to background.js
- How can I make an array in my extension using information from a webpage?
- Is it possible to manipuate 3rd party Chrome Extensions Network Reqeuests?
- How to call a function in javascript for google chrome extension?
- Creating Chrome extension, but display text from Javascript file is not showing up on HTML's display. The HTML is the InnerHTML of another HTML file
- Error received when sending message across JS files: Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist
- How do I highlight email address strings through a chrome extension?
- How do i load a Chrome extension when manifest.json is in a subfolder (app) instead of main folder
- Chrome extension MV3: persistent service worker die after wake up from hibernation
- Attempting to Bundle a Require Command For a Chrome Extension
- Embedded google map throws net::ERR_BLOCKED_BY_CLIENT in chromium(Brave) browser
- Reading the user's console errors from a chrome extension
- Persistent Browser Extension Reinstalls Itself: How to Eradicate ‘YOfficeStop’ Permanently on Windows 7?
- Can be their an extension to save pages in as offline in the browser itself?
- How can I modify javascript native fetch function from an extension?
Related Questions in YOUTUBE
- youtube api quota limit of 10000api
- I am the domain admin, newbie, how do I connect youtube.com on my domain?
- My youtube widget keeps getting overflow pixels on full screen
- Does server-side content security policy exist for youtube video player API, app, mod apks and website?
- I want to embed YouTube videos in my web app while safeguarding the direct video links. How can I do this?
- Get ISRC from a YouTube video using YouTube Data API v3
- YouTube embed mutes by default on load
- How to solve the problem of being prompted for copyright restrictions (not copyright strikes) when I post a video on YouTube?
- QML WebEngineView doesn't play YouTube video if the video hasn't 480p quality
- YouTube Data API v3 check if a Video/Song has explicit lyrics
- Anyone around Good at both Javascript and Youtube api?, I am using lite-youtube js and I am confused in adding an eventlistener for onStateChange
- Youtube api question, make a perfect copy of a playlist
- Is there a way to use Youtube API for realtime history browser verification?
- Find a code to detect YouTube video end and hide related video on Wordpress
- Youtube Caption Download gives Error 404, the caption id is valid
Related Questions in DOM-EVENTS
- How to listen for LightDOM Label "FOR=" events via ShadowDOM Custom Element
- Removing the beforeunload event does not work in React
- event handling for overlapping polygons in google maps
- EventListener is not being added to button elements
- Why is the blur event listener fired twice for the same element with contenteditable in this case?
- Popover API: Event bubbling not working on beforetoggle event?
- An HTML Link Element ("a") Refuses to Attach Itself to Event Listener
- "contextmenu" Event interrupts "onmousemove" from executing a function
- handling the cancel of window.onbeforeunload prompt
- How to appendchild() using drag drop with 2 hierarchically equal divs? using Typescript
- ResizeObserver callback is not being fired when rotated device two times
- How to append an element to a specific div - Vanilla JS?
- How to make every subsequent sibling after a button-wrapper disappear and restore their visibility again by pressing this very button?
- brush overlaps events on other elements
- Rotating chevron in accordion in javascript
Related Questions in DOMCONTENTLOADED
- The module / DOMContentLoaded event conundrum
- Loading document with DOM
- Transition properties defined in CSS classes do not take effect when changing an element's class using JavaScript
- waitForLoadState('networkidle') does not work in Playwright
- Run two separate functions on DOMContentLoaded
- Google Extension doesn't fire DOMContentLoaded, load or onload
- DOMContentLoaded is being called twice when using a module
- window DOMContentLoaded or document DOMContentLoaded when fetching data?
- How can i get webpage network title DOMContentLoaded by curl
- addEventListener on window doesn't recognize event? load/DOMContentLoaded not working
- Angular 15, javascript loading on Safari
- Listening for DOMContentLoaded event from child frame
- Interaction of module defer with DOMContentLoaded for inline scripts in browser
- window DOMContentLoaded vs document DOMContentLoaded
- Javascript using DOMContentLoaded as multiple html files needed
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You could solve this by using MutationObservers in your content script.
Example from mdn web docs below, you should be able to call and find new elements by using
document.querySelectorAll()inside the callback function.