I'm looking for a way to recreate the functionality of a refreshing page extension on a browser (e.g. Auto refresh plus in Chrome) by using javascript. The problem is that I have no ideia how to achieve that. I must find a way to refresh the page every second or so, click on a link that appears on the page from time to time, add a sound effect for when it appears and send an e-mail notification every time it appears.
I'm trying to use a simple javascript snippet to run in the console in order to refresh the page:
win1 = window.open("https://www.myUrl.com/");
timer1 = setInterval(function(){win1.location.href="https://www.myUrl.com/"}, 1500);
However, this implies running code from tab A on tab B which I found very challenging. The code can't run on tab A alone because at the time it refreshes the page, it gets erased from the console. I know it would have been so much easier to use an extension, but the platform I work for does not allowed any extensions. I have basic HTML and javascript knowledge, but I find this would be a good project to learn more. Also, if the solution involves other languages, I just need a direction to know where to look for and start this project.