I am trying to make a chrome extension which requires me to collect the post links. But the problem with collecting the link is that it is available on the anchor tag on the timestamp that FB provides over each post.
But the href of the anchor tag is populated dynamically when you hover over the element.
I tried dispatching a mouseover and mouseenter events on the element but the href is still not populated.
My function :
const hoverOverTag = (element) => {
var event = new Event('mouseover', {
'view': window,
'bubbles': true,
'cancelable': true
});
element.addEventListener('mouseover', function(e) {
console.log("hover");
console.log(e);
});
element.dispatchEvent(event);
}
The event listener runs and logs the event properly. But still href does not get populated. I am running this in a content script, is there any way i can get the post link ?
