From: Joshua Rüsweg Date: Sat, 12 May 2018 18:29:51 +0000 (+0200) Subject: Add new global JavaScript reactionType variable X-Git-Tag: 5.2.0_Alpha_1~364^2~101^2~117 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=28c81d96f262fda71bca39499a5f7177e788c693;p=GitHub%2FWoltLab%2FWCF.git Add new global JavaScript reactionType variable See #2508 --- diff --git a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl index 92dc326366..98d8736afa 100644 --- a/com.woltlab.wcf/templates/headIncludeJavaScript.tpl +++ b/com.woltlab.wcf/templates/headIncludeJavaScript.tpl @@ -16,6 +16,8 @@ var ENABLE_DEVELOPER_TOOLS = {if ENABLE_DEVELOPER_TOOLS}true{else}false{/if}; var WSC_API_VERSION = {@WSC_API_VERSION}; + var REACTION_TYPES = {@$__wcf->getReactionHandler()->getReactionsJSVariable()}; + {if ENABLE_DEBUG_MODE} {* This constant is a compiler option, it does not exist in production. *} var COMPILER_TARGET_DEFAULT = {if !VISITOR_USE_TINY_BUILD || $__wcf->user->userID}true{else}false{/if}; @@ -130,7 +132,8 @@ requirejs.config({ styleChanger: {if $__wcf->getStyleHandler()->showStyleChanger()}true{else}false{/if} }); - User.init({@$__wcf->user->userID}, '{@$__wcf->user->username|encodeJS}', {if $__wcf->user->userID}'{@$__wcf->user->getLink()|encodeJS}'{else}''{/if}); +User.init({@$__wcf->user->userID}, '{@$__wcf->user->username|encodeJS}', {if $__wcf->user->userID}'{@$__wcf->user->getLink()|encodeJS}'; + {else}'';{/if}) }); // prevent jQuery and other libraries from utilizing define()