From 28c81d96f262fda71bca39499a5f7177e788c693 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Sat, 12 May 2018 20:29:51 +0200 Subject: [PATCH] Add new global JavaScript reactionType variable See #2508 --- com.woltlab.wcf/templates/headIncludeJavaScript.tpl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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() -- 2.20.1