Skip to content

Instantly share code, notes, and snippets.

View OttCS's full-sized avatar
👷‍♂️
Working on SOLAS

OttCS OttCS

👷‍♂️
Working on SOLAS
View GitHub Profile
@demonixis
demonixis / toggleFullscreen.js
Created March 18, 2013 16:07
A simple function to toggle fullscreen in JavaScript. It work well on Firefox and Webkit browsers.
/**
* Toggle fullscreen function who work with webkit and firefox.
* @function toggleFullscreen
* @param {Object} event
*/
function toggleFullscreen(event) {
var element = document.body;
if (event instanceof HTMLElement) {
element = event;