Moved hashlink test in embed

This commit is contained in:
Kasper Rynning-Tønnesen
2018-05-07 14:31:42 +02:00
parent 800731f09f
commit c5a79e718a
2 changed files with 7 additions and 9 deletions

View File

@@ -76,14 +76,15 @@ function receiveMessage(event) {
}
}
if(hash.length >= 3 && hash[2] == "autoplay"){
autoplay = true;
Helper.css("#player", "visibility", "hidden");
} else {
paused = true;
}
window.addEventListener("message", receiveMessage, false);
window.addEventListener("DOMContentLoaded", function() {
if(hash.length >= 3 && hash[2] == "autoplay"){
autoplay = true;
Helper.css("#player", "visibility", "hidden");
} else {
paused = true;
}
if(hash.indexOf("videoonly") > -1) {
Helper.addClass("#wrapper", "hide");