0

I try to develop a chrome Extension, that logs your Browser History. I already have a Javascript function, that only needs to be executed, whenever a site is loaded. How can I do this? I cannot find anything about this on Internet please help.

Thank you.

  • Check [`page-reader`](https://github.com/GoogleChrome/chrome-extensions-samples/blob/main/examples/page-redder/background.js) sample from official [`chrome-extensions-samples`](https://github.com/GoogleChrome/chrome-extensions-samples) – User863 Mar 20 '22 at 12:37

1 Answers1

-2

In html:

<element onload="yourFunction()">

In javascript

window.onload = function() {
 yourFunction(); };
Dhaifallah
  • 818
  • 1
  • 2
  • 15