Fix #1991 add shim for Modernizr to accommodate old addons that rely on it

This commit is contained in:
Kijin Sung 2022-09-14 21:13:29 +09:00
parent 89f8a77ecb
commit 7058f9fa85

View file

@ -304,6 +304,20 @@
}
};
/**
* Shim for Modernizr if it is not loaded
*/
window.Modernizr = {
audio: true,
video: true,
canvas: true,
history: true,
postmessage: true,
geolocation: ('geolocation' in navigator),
touch: ('ontouchstart' in window) || (navigator.maxTouchPoints > 0),
webgl: !!window.WebGLRenderingContext
};
})(jQuery);
/* jQuery(document).ready() */