Add fullscreen button

This commit is contained in:
Calvin Montgomery 2015-07-06 17:35:04 -07:00
parent a6ddebbec3
commit c0f76bcf00
2 changed files with 15 additions and 0 deletions

View file

@ -792,3 +792,16 @@ $("#emotelist-alphabetical").change(function () {
EMOTELIST.handleChange();
EMOTELIST.loadPage(0);
});
$("#fullscreenbtn").click(function () {
var elem = document.querySelector("#videowrap .embed-responsive");
// this shit is why frontend web development sucks
var fn = elem.requestFullscreen ||
elem.mozRequestFullScreen || // Mozilla has to be different and use a capital 'S'
elem.webkitRequestFullscreen ||
elem.msRequestFullscreen;
if (fn) {
fn.call(elem);
}
});