From: Tim Düsterhus Date: Fri, 13 Jan 2017 18:53:29 +0000 (+0100) Subject: Support jQuery plugins utilizing AMD X-Git-Tag: 3.0.1~4^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b8c254e85a794a5deae2c4471d6b6427b4eff918;p=GitHub%2FWoltLab%2FWCF.git Support jQuery plugins utilizing AMD --- diff --git a/wcfsetup/install/files/js/require.config.js b/wcfsetup/install/files/js/require.config.js index e0c2be8ad6..a313b04f39 100644 --- a/wcfsetup/install/files/js/require.config.js +++ b/wcfsetup/install/files/js/require.config.js @@ -44,3 +44,12 @@ requirejs.config({ } } }); + +/* Define jQuery shim. We cannot use the shim object in the configuration above, + because it tries to load the file, even if the exported global already exists. + This shim is needed for jQuery plugins supporting an AMD loaded jQuery, because + we break the AMD support of jQuery for BC reasons. +*/ +define('jquery', function() { + return window.jQuery; +});