Created
August 3, 2022 19:03
-
-
Save SC-One/3437af09a89eb01d7cb87d67c79226fd to your computer and use it in GitHub Desktop.
Automatic refresh window in js (usecase: browser console)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
win1 = window.open("https://www.binance.com/en/price/binance-usd") | |
var windowObject = win1.document | |
var counter = 0 | |
timer1 = setInterval(function() { | |
win1.location.href = "https://www.binance.com/en/price/binance-usd" | |
counter++ | |
console.log("Counter: ", counter) | |
// if (windowObject < win1.document || windowObject > win1.document) { | |
// alert("Hi diffrent page") | |
// } | |
}, 3 * 1000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment