Force focus with query param to show focus message

This commit is contained in:
Jeremy Zhang 2017-06-10 01:38:20 +00:00
parent a4ed38e59d
commit f4341b6e36

View File

@ -152,16 +152,20 @@
$("#theme-selector option[value=" + theme + "]").attr('selected', 'selected');
$('select').material_select();
}
if (document.hasFocus()) {
primeEmbed();
}
$(window).focus(function() {
if (!has_already_been_focused) {
if (getParameterByName("forcefocus") == "1") {
if (document.hasFocus()) {
primeEmbed();
}
});
$(window).focus(function() {
if (!has_already_been_focused) {
primeEmbed();
}
});
} else {
primeEmbed();
}
});
function changeTheme(theme) {