Moved configuration of the widget direction outside iframe