Xenorosth Xenorosth - 5 months ago 20
HTML Question

Extending Chrome to capture Mouse Data on Browser

The idea was simple. Take the mouse data during general use, and store it into a local database. However, then I learned, sadly that you cannot use php! Is there any way to, with chrome, to capture window data, such as mouse locations, click locations, and so forth?

I want to simply store event.clientX and event.clientY paired together in some sort of file.

In short, I want it to work the same way it'd work on a single web page if you used the onmousemove event.

Can anyone help explain if this is possible, and a point in the right direction? If it isn't possible, let me know why.

neo neo
Answer

PHP is server side scripting language.Under any circumstances it has got nothing to do with your requirments. Javascript is what you need as you said.You can get information's about the content clicked, location of click, co-ordiantes etc from javscript. The simplest example program is by just adding this javascript code to end of and HTML file and open the console log box in browser and click on different locations of the browser view port.

<script>
    window.onclick = function(event) {
    console.log(event);
    }
</script>