- IE10
- Firefox
- Chrome
- Safari
- Opera
Based off some code I wrote for asynchronous document.write.
const path = require('path'); | |
const fs = require('fs-extra'); | |
const pkg = require('./package.json'); | |
const SH_TEMPLATE = binPath => | |
`#!/bin/sh | |
basedir=$(dirname "$(echo "$0" | sed -e 's,\\\\,/,g')") | |
case \`uname\` in | |
*CYGWIN*) basedir=\`cygpath -w "$basedir"\`;; |
<script type="text/javascript"> | |
(function () { | |
"use strict"; | |
// once cached, the css file is stored on the client forever unless | |
// the URL below is changed. Any change will invalidate the cache | |
var css_href = './index_files/web-fonts.css'; | |
// a simple event handler wrapper | |
function on(el, ev, callback) { | |
if (el.addEventListener) { | |
el.addEventListener(ev, callback, false); |
Based off some code I wrote for asynchronous document.write.
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |
// detecting if browser supports fullscreen | |
return document.body.mozRequestFullScreen || document.body.webkitRequestFullScreen || document.body.requestFullScreen; | |
// requesting full screen on an elm | |
( elm.mozRequestFullScreen && elm.mozRequestFullScreen() ) || ( elm.webkitRequestFullScreen && elm.webkitRequestFullScreen() ) || ( elm.requestFullScreen && elm.requestFullScreen() ); | |
//binding to full screen event | |
( document.body.requestFullScreen && window.addEventListener('fullscreenchange',fullScreenEvent) ) || ( document.body.webkitRequestFullScreen && window.addEventListener('webkitfullscreenchange',fullScreenEvent ) ) || ( document.body.mozRequestFullScreen && window.addEventListener('mozfullscreenchange',fullScreenEvent) ); | |
/* | |
* object.watch polyfill | |
* | |
* 2012-04-03 | |
* | |
* By Eli Grey, http://eligrey.com | |
* Public Domain. | |
* NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK. | |
*/ |