Skip to content

Instantly share code, notes, and snippets.

@ilblog
ilblog / README.md
Last active Sep 13, 2021
Create mp4 video from set of images in the browser client side, using ffmpeg.js in worker thread
View README.md
@ilblog
ilblog / fullscreen_controller.js
Created Dec 20, 2017
Microscopic Javascript fullscreen controller
View fullscreen_controller.js
// Fullscreen controller used on www.windy.com
const d = document
, el = $('#fullscreen')
, isFullscreen = () => d.fullscreen || d.webkitIsFullScreen || d.mozFullScreen
, onFullChange = () => el.innerHTML = isFullscreen() ? '' : '-' // Change of icon
d.addEventListener('fullscreenchange', onFullChange )
d.addEventListener('webkitfullscreenchange',onFullChange )
d.addEventListener('webkitfullscreenchange',onFullChange )
d.addEventListener('mozfullscreenchange',onFullChange )