remove https check in javascript (github now allows to enforce https for gh-pages)
This commit is contained in:
parent
0845ca605a
commit
9296bb6a63
@ -52,11 +52,7 @@
|
|||||||
( 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' ) {
|
navigator.serviceWorker.register( 'serviceworker.js' );
|
||||||
location.protocol = 'https:';
|
|
||||||
} else {
|
|
||||||
navigator.serviceWorker.register( 'serviceworker.js' );
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var loaderEl = document.createElement( 'div' );
|
var loaderEl = document.createElement( 'div' );
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user