I am trying to create a Chrome Extension that will replace all ads on a page with pictures of a dog just for fun. I know I could use adblocker. I have been using document.images document.getelementsbytagname and document.queryselectorall and these don't find me all of the img tags on the page for some reason. Even When I used document.queryselectorall("*") and then filter by tagname = "IMG" it still finds just the original tags from before but not the ads. On this webpage it only finds the img tags for the users pics but doesn't find the img tags for the ads. Why is this the case? Shouldn't querySelectorAll find all the elements on the page and then find all the tags with the IMG tagName property and put those into the list?
var all = document.querySelectorAll('*');
var complist = [];
for(i=0;i<all.length;i++){
if(all[i].tagName == "IMG"){
complist.push(all[i]);
};
};