document.addEventListener("DOMContentLoaded", function() {
  console.log('Ready for takeoff');

  var timeInp = document.querySelector('#time');
  timeInp.addEventListener('keyup', updateTzValue);

  var dateInp = document.querySelector('#date');
  dateInp.addEventListener('keyup', updateTzValue);

  var tzLabel = document.querySelector('#l_tz');
  var tzInp = tzLabel.querySelector('input');
  tzLabel.parentNode.insertBefore(tzLabel, tzLabel.parentNode.firstChild); // move to top for not to mess with css
  tzLabel.style.display = "none";
  updateTzValue();

  function getTzOff(date) {
    return (date.getTimezoneOffset() * -1)/60;;
  }

  function updateTzValue() {
    var tmpDate = new Date(getDateTimeString(dateInp.value, timeInp.value));
    if (!isNaN(tmpDate.getTime())) {
      tzInp.value = getTzOff(tmpDate);
    } else {
      tzInp.value = getTzOff(new Date());
    }
  }

  function getDateTimeString(dateString, timeString) {
  	if (timeString != '') {
  		return dateString+'T'+timeString;
  	} else {
      return dateString
    }
  }

});

@@ -56,45 +56,8 @@
 ) %7B%0A
-  console.log('Ready for takeoff');%0A%0A
   va
@@ -711,18 +711,29 @@
 ));%0A    
-if
+tzInp.value =
  (!isNaN
@@ -757,81 +757,29 @@
 ))) 
-%7B%0A      tzInp.value = getTzOff(tmpDate);%0A    %7D else %7B%0A      tzInp.value =
+? getTzOff(tmpDate) :
  get
@@ -797,22 +797,16 @@
 ate());%0A
-    %7D%0A
   %7D%0A%0A  f
@@ -864,10 +864,14 @@
 %0A  %09
-if
+return
  (ti
@@ -890,20 +890,9 @@
 '') 
-%7B%0A  %09%09return
+?
  dat
@@ -917,34 +917,10 @@
 ring
-;%0A  %09%7D else %7B%0A      return
+ :
  dat
@@ -930,14 +930,9 @@
 ring
-%0A    %7D
+;
 %0A  %7D

remove log from client side create js and use short notation for if