Problems to be Solved #1 : Ad Links - Progress 3.0
Having difficulties on getting the links of the advertisements with javascript and jQuery, we continued to look at the logic in Ad Sticker. We tried to modify the codes, and use console.log to get the link. It is successful in youtube.com almost every time, and the reason should be the list for the domain of googleAd.
But we have difficulties to combine the extension. Therefore, we still look at any examples can help us on getting links from ads. As the ads, especially for Google Ads are put in the div id of #aw0, so one of the example we found is using getElementByID : var someDOMElement = document.getElementById('aw0');
var hrefOfelement = someDOMElement.getAttribute('href');
var hrefOfelement = document.getElementById('aw0').getAttribute('href')
Reference:
AdSticker
https://github.com/nutzman/AdSticker Page about getting link from ad