html: add controller & action attributes to <body> tag (#3844).

This commit is contained in:
evazion
2018-08-26 14:10:47 -05:00
parent b98bc26397
commit 4e1d76da81
3 changed files with 21 additions and 6 deletions

View File

@@ -117,7 +117,7 @@ PostModeMenu.change = function() {
return;
}
var $body = $(document.body);
$body.removeClass();
$body.removeClass((i, classNames) => classNames.split(/ /).filter(name => /^mode-/.test(name)).join(" "));
$body.addClass("mode-" + s);
Cookie.put("mode", s, 1);