Fullscreen in OSweb shows white margins/sliders when exp is in black background
Hi everyone,
I want to run an experiment that has a black background online with OSweb. However, when I want to run it online in fullscreen mode, the sketchpads are surrounded by white margins (about 1-3cm, depending on the monitor). The exp.is set to be at 1600x900 resolution, and if I make the resolution higher or adjust it according to the monitor (i.e. 1920x1080), instead of margins, there are sliders to scroll a little bit down and up throughout the sketchpad. Hope I managed to explain this right :)
If anyone knows a simple solution to this issue that I might have been missing, please let me know.
Cheers,
Marija
Comments
Hi @marija123 ,
That's indeed the default behavior of OSWeb, the idea being that this visually conveys the part of the window that is used by the experiment. It's not always ideal though, I see that, so it might be useful to make this configurable in a future update.
For now, you can do this by adding an
inline_javascriptto the start of the experiment with the following code in the prepare phase:// For OpenSesame >= 4.0 / OSWeb >= 2.0 document.getElementsByTagName('body')[0].style.backgroundColor = background // For OpenSesame <= 3.3 / OSWeb <= 1.4 document.getElementsByTagName('body')[0].style.backgroundColor = vars.backgroundThis will set the background of the entire page to the experiment background.
Hope this helps!
— Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!
It worked! Thank you so much 😁