From 7058f9fa858ef5030767e3c2eb918056ff9efce1 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Wed, 14 Sep 2022 21:13:29 +0900 Subject: [PATCH] Fix #1991 add shim for Modernizr to accommodate old addons that rely on it --- common/js/common.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/common/js/common.js b/common/js/common.js index 7de40a712..3d9547fc6 100644 --- a/common/js/common.js +++ b/common/js/common.js @@ -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() */