0
I’m trying to duplicate the div meta
from a Youtube video page. It’s the div below the video title div and like and dislike. I want you to have 2 equal ones, one on top of the other.
But when I use:
original = document.querySelectorAll('#meta');
clone = original[original.length-1].cloneNode(true);
clone.id = "meta1";
original[original.length-1].after(clone);
It duplicates the div, but the information within it (the children) does not appear.
"I’m trying to duplicate the div meta of a Youtube video page"... how so?
– Sam
@Sam I just updated the question, hope it helps.
– Amzero
Is that a built-in video? How is that?
– Sam
is a Youtube video page, for example: https://www.youtube.com/watch?v=nM__lPTWThU
– Amzero
Dude, doubling you should be. The problem is that it goes beyond simply adding the div below the other. You’ll have to change the
css
and the responsive commands that Youtube uses. I believe the issue is too wide...– bio
It seems to me that the div is rendered at runtime. You can even clone, the data is all in the clone, but the data does not appear because it is rendered only when loading the page.
– Sam
It’s weird because as far as I know, the deep clone clones everything. CSS, etc. I’ve already put the same ID instead of changing it. You can see the entire HTML of the cloned Ode just like that. I think what it can be is a complex JS acting there. You know some other way to do what I want?
– Amzero