From 15460ebc2a2a047a67a784b67a84901abcf5c0d9 Mon Sep 17 00:00:00 2001 From: Cevo Date: Thu, 8 Oct 2015 12:04:40 +0200 Subject: [PATCH] some more cleaning --- js/components/header.js | 2 +- js/utils/head_setter.js | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/js/components/header.js b/js/components/header.js index dc2d8a23..e882e4a3 100644 --- a/js/components/header.js +++ b/js/components/header.js @@ -68,7 +68,7 @@ let Header = React.createClass({ setTitle(whitelabel.title) constructHead(whitelabel.head); if (whitelabel.subdomain !== 'www'){ - return ; + return(); } else { return ( diff --git a/js/utils/head_setter.js b/js/utils/head_setter.js index 16fe4c15..54e037cd 100644 --- a/js/utils/head_setter.js +++ b/js/utils/head_setter.js @@ -1,13 +1,10 @@ -/** - * Created by cevo on 06.10.15. - */ 'use strict'; // elementType: string, is the type of the element, such as link, meta, etc. // elementId id of the element // elementAttributes: hash table containing the attributes of the relevant element -let constructHeadElement = function(elementType, elementId, elementAttributes) { +function constructHeadElement(elementType, elementId, elementAttributes) { let head = (document.head || document.getElementsByTagName('head')[0]); let element = document.createElement(elementType); let oldElement = document.getElementById(elementId); @@ -26,7 +23,7 @@ let constructHeadElement = function(elementType, elementId, elementAttributes) { } head.appendChild(element); return this; -}; +} // Accepts a dictionary of dictionaries which comprises a part or all of html head part // {link : {id1: {rel: ... }}}