JS function doesn't work in player

YouTube Simulator script pic
[scratchblocks]run (JavaScript function [x] ◁ ▷ [window.open("htps://www.domain.com/");]::operators)::control//the https part is spelt "htps" deliberately[/scratchblocks]
This JS function will open any domain in the speech marks (").
But for some reason it doesn't work in the player, only in the editor.

use top.window.open() instead