From 5310e0a9f80ec2fe8cdaed976c49bd1c8d50db4c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Joshua=20R=C3=BCsweg?= Date: Mon, 6 Aug 2018 15:03:50 +0200 Subject: [PATCH] Improve readability of assigned classes See #2508 --- .../files/js/WoltLabSuite/Core/Ui/Like/Handler.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Like/Handler.js b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Like/Handler.js index 39d10d8bf8..6e8c813b3f 100644 --- a/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Like/Handler.js +++ b/wcfsetup/install/files/js/WoltLabSuite/Core/Ui/Like/Handler.js @@ -210,7 +210,15 @@ define( } var button = elCreate('a'); - button.className = 'jsTooltip reactButton' + (this._options.renderAsButton ? ' button' + (jsMobileNavigation ? ' ignoreMobileNavigation' : '') : ''); + button.className = 'jsTooltip reactButton'; + if (this._options.renderAsButton) { + button.classList.add('button'); + + if (jsMobileNavigation) { + button.classList.add('ignoreMobileNavigation'); + } + } + button.href = '#'; button.title = title; -- 2.20.1