var pano_iframe_name = "embed_iframe_box"; window.addEventListener("devicemotion", function(e){ [...]