Redirect to incomplete URL as soon as one exits full screen

URL of experiment:

Description of the problem:
Now you have to press “esc” twice to quit the experiment and be redirected to the incomplete URL. I want that to happen upon the first press of “esc” right after the full screen mode is exited. For some reason, only one press was needed when I tried out the experiment yesterday, but now it expects two presses.

Please help me resolve this problem ASAP!!! :slightly_smiling_face:

This code might help:

I think what you would need is to quit in code when exiting full screen is detected

Thanks for your suggestion. Now it can exit with one press. But besides the alert message, whenever I exit it shows the message “The [Escape] key was pressed. Goodbye!” in the main screen, and you have to click on “ok” again to be redirected to the Prolific page. I find that feature to be quite redundant.

Is there a way to change the content to something like “Now you will be redirected to Prolific.” Or simply get rid of the message box?

Here is my experiment link again:

Have a look at this solution.