remove https check in javascript (github now allows to enforce https for gh-pages)

This commit is contained in:
Georg Fischer 2016-06-11 11:25:00 +02:00
parent 0845ca605a
commit 9296bb6a63

View File

@ -52,12 +52,8 @@
( testCanvas.getContext && testCanvas.getContext( '2d' ) ) ( testCanvas.getContext && testCanvas.getContext( '2d' ) )
) { ) {
if ( 'serviceWorker' in navigator ) { if ( 'serviceWorker' in navigator ) {
if ( location.protocol !== 'https:' && location.host !== 'localhost' ) {
location.protocol = 'https:';
} else {
navigator.serviceWorker.register( 'serviceworker.js' ); navigator.serviceWorker.register( 'serviceworker.js' );
} }
}
var loaderEl = document.createElement( 'div' ); var loaderEl = document.createElement( 'div' );
loaderEl.classList.add( 'loader' ); loaderEl.classList.add( 'loader' );