Weird question but how do you check if a tab contains a specific webpage?

Hello! I arrive again with weird questions ^^
I want to make the player open a webpage (which is a feedback form and it is totally their own choice whether they will open it or not) .After completing the survey, they will be redirected to a thank you page. I want to check if this thank you (or proof that you completed it page) is loaded or not. If it is loaded, the player will get a type of in-game present like an item (because normally people don't want to participate in surveys) for completing it and helping me with their feedback.
So I did this:
opened the webpage ---> window.open(the url)
checked if the 2nd page was loaded --->
if ( window.location.href == 2nd url) {
get an item
}
It doesn't work! Help me please.


Edit: -_- I'm stupid. It's not supposed to work because obviously MV can't detect if the url I'm talking about is open. I tried the above properly and it shows the url of the index.html file

Well if anyone has any suggestions feel free to tell me ^^

Editx2: I may have figured something out regarding this issue. I guess relying on whether the page was loaded or not isn't an effective way. I will test out my idea tomorrow and if it works, I think it'll be a much better way to do this.
Is this for a web browser game or a desktop game? That makes a huge difference.

(yet. I had only 2 classes on Java and that was a piece of cake)

If you're looking things up on the internet to help, remember the language MV uses is Javascript, not Java (two different languages). Just don't want you wasting time looking at Java tutorials because those won't help :LZSsmile:
It is (or rather, will be) a desktop game.
This is the 3rd time this week I've been told this :") I know MV uses javascript. I meant to say I'm a noob to programming no matter what the language. I searched the net for 'how to do this using javascript' too.
OK cool, it should actually be a much easier task with a desktop game. With a web browser game it's still do-able but there would be many different ways to choose from which can make it complicated.

This is pretty much the documentation to start with:
http://docs.nwjs.io/en/latest/References/Window
Basically you would do something like:
Code:
const currentWin = nw.Window.get()
let newWin
currentWin.open(url, {}, createdWin => newWin = createdWin)
Then presumably you would have access to the newly created window from the old window through the variable "newWin". You could check that to see what URL it currently has, etc.

Note - I haven't tested this, only typed it from looking at the documentation. I'd be happy to test this later, maybe tomorrow, and see if there are any difficulties. Or if you or anyone else wants to try it, that would help too.

Edit:
@Hyouryuu-Na

I tested it and it was almost what I said originally:
Code:
let newWin
nw.Window.open(url, {}, createdWin => newWin = createdWin)
// Navigate somewhere in the new window
console.log(newWin.window.location.href)

With that, you can get the URL of the new window from the existing window.

Original thread: https://forums.rpgmakerweb.com/threads/weird-question-but-how-do-you-check-if-a-tab-contains-a-specific-webpage.114006/