I want to create an extension/tool that will track which elements I click on, on any given webpage.
For example:
<html> <button id="firstButton">Click Me</button> </html>
Whenever I click on the button, I would want to store the data associated with this tag: button, id is "firstButton", etc
My question is do I have to create a browser extension or can I access my browser actions via some log file or other way? And if using an extension, what functions(javascript) can I use to get this data?
I successfully got this to work with Javascript in a popup modal I created but couldn't get anything in the seperate DOM of the browser window, why is that?
I used: document.addEventListener = function(event) {
And it worked fine with the popup.