lifeinbeta_

Your awesome Tagline

Posts tagged framework

22 notes

Screenfull.js - Simple cross browser wrapper for Fullscreen API

gregbabula:

The Fullscreen API is fairly new with growing support but the implementation varies across browsers. Screenfull.js is a simple script from Sindre Sorhus to change that, changing:

document.fullscreenEnabled = document.fullscreenEnabled || document.mozFullScreenEnabled || document.documentElement.webkitRequestFullScreen; function requestFullscreen( element ) { if ( element.requestFullscreen ) { element.requestFullscreen(); } else if ( element.mozRequestFullScreen ) { element.mozRequestFullScreen(); } else if ( element.webkitRequestFullScreen ) { element.webkitRequestFullScreen( Element.ALLOW_KEYBOARD_INPUT ); } } if ( document.fullscreenEnabled ) { requestFullscreen( document.documentElement ); } 

to

if ( screenfull ) screenfull.request(); 

The source is on GitHub.

(Source: thechangelog)

Filed under javascript framework ui

1 note

basket.js (0.2)

gregbabula:

A simple (proof-of-concept) script loader that caches scripts with localStorage

basket.js is a small JavaScript library supporting localStorage caching of scripts. If script(s) have previously been saved locally, they will simply be loaded and injected into the current document. If not, they will be XHR’d in for use right away, but cached so that no additional loads are required in the future.

Filed under javascript framework