Dynamically Prevent Page Turn to Next Page

There is an one liner also from the Hype Extension project to find the current scene. This does the same with less code for efficiency.

var sceneElement = document.querySelector('#'+ hypeDocument.documentId()+' > .HYPE_scene[style*="block"]');
sceneElement.style.setProperty("pointer-events", "none", "important");
2 Likes