From 0c596f60f02d78af17d3fda50c89d717c5629faa Mon Sep 17 00:00:00 2001 From: Cade Scroggins Date: Sat, 13 Aug 2016 14:06:58 -0700 Subject: [PATCH] =?UTF-8?q?remove=20=E2=99=A5=20/=20s2d=20->=20insertAdjac?= =?UTF-8?q?entHTML?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index dd2f701..626d883 100644 --- a/index.html +++ b/index.html @@ -1,7 +1,5 @@ - - @@ -171,12 +169,6 @@ return document.querySelector(s); }; - function s2d(s) { - var d = document.createElement('div'); - d.innerHTML = s; - return d.firstChild; - } - var Clock = (function() { var clock = $('#js-clock'); @@ -199,11 +191,13 @@ var searchHelp = $('#js-help'); config.commands.forEach(function(command) { - head.appendChild(s2d( + head.insertAdjacentHTML( + 'beforeend', '' - )); + ); - searchHelp.appendChild(s2d( + searchHelp.insertAdjacentHTML( + 'beforeend', '
  • ' + '' + command.key + config.searchDelimiter + ' ' + @@ -212,7 +206,7 @@ command.name + '' + '
  • ' - )); + ); }); document.addEventListener('keydown', function(event) {