Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Show mouse cursor during the whole experiment using OSWeb

Hi,

I'm conducting an online experiment where I would need the cursor to be shown during the whole experiment (i.e. even when the sketchpad has a minimum duration or a keypress is requested). Is it possible to implement this using an inline JavaScript? My attempts to do this have unfortunately all failed so far. 

Many thanks in advance!

Carla

Comments

  • Hi @CarlaC,

    The following method might for for you (I tried it and it worked in Chrome; I assume it should work in all browsers):

    Insert a inline_javascript object with the following code at the very beginning of your task:

    document.querySelectorAll('*').forEach(function(node) {
    node.style.cursor = 'default';
    });
    

    This should work whether you put it in the "Run" or the "Prepare" tab.

    I attach a basic example here:

    The mouse cursos should stay visbmle throughout the task.

    Hope this helps,

    Fabrice.

    Buy Me A Coffee

  • Hi @Fab

    thank you very much for that solution!

    I have a sequence where there are 11 sketchpads followed by a keypress and mouse response with a 50ms timeout and 2 inline_javascripts. 

    The solution for me was to put the inline_javascript for the mouse cursor before each of the 11 sketchpads. 

    Best, 

    Carla

Sign In or Register to comment.