javascript - Call function anytime a link is moused over on an arbitrary page? -


i apologize possibly naive nature of question not web developer day.

is possible write script such that, arbitrary web page, function have written called if url moused over? thinking use document.links assemble array of of hrefs in document , add onmouseover event attribute each of them but, unless i'm mistaken, overwrite existing onmouseover attributes present in page. not ideal.

i'm not sure if arbitrary web page mean pages on domains or pages of own domain, latter put following in pages:

$(function () {     $(document).on('mouseenter', 'a', function () {         console.log(this, 'hovered');     }); }); 

if mean page browse on net, have write browser extension browser using. chrome have @ this.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -