{"size": 1621, "ext": "js", "max_stars_repo_path": "js/index.js", "max_stars_repo_name": "3v1lW1th1n/unkl4b.github.io", "max_stars_repo_stars_event_min_datetime": "2018-01-25T02:30:12.000Z", "max_stars_repo_stars_event_max_datetime": "2020-09-08T20:53:18.000Z", "max_issues_repo_path": "js/index.js", "max_issues_repo_name": "3v1lW1th1n/unkl4b.github.io", "max_issues_repo_issues_event_min_datetime": "2022-02-10T18:27:59.000Z", "max_issues_repo_issues_event_max_datetime": "2022-02-10T18:27:59.000Z", "max_forks_repo_path": "js/index.js", "max_forks_repo_name": "3v1lW1th1n/unkl4b.github.io", "max_forks_repo_forks_event_min_datetime": "2019-11-05T22:54:58.000Z", "max_forks_repo_forks_event_max_datetime": "2021-02-25T15:14:52.000Z"}
{"max_stars_count": 3, "max_issues_count": 1, "max_forks_count": 4, "avg_line_length": 19.2976190476, "max_line_length": 76, "alphanum_fraction": 0.5996298581}
function getAllElementsWithAttribute(attribute)
{
  var matchingElements = [];
  
  var allElements = document.getElementsByTagName('span');
  
  for (var i = 0, n = allElements.length; i < n; i++)
  {
    if (allElements[i].getAttribute(attribute))
    {
      matchingElements.push(allElements[i]);
    }
  }
  return matchingElements;
}

var terminalElements = getAllElementsWithAttribute("terminal");

function terminals_init()
{
  var elements = terminalElements;
  for (var i = 0; i < elements.length; i++)
  {
    var e = elements[i]
    e.completeHTML = e.innerHTML
    e.innerHTML = ""
    e.i = 0
  }

}

function terminals_start()
{
  //terminalIntervalFunction = function(){ terminals_next() }
  //setInterval(terminalIntervalFunction, 1000/60);
  terminals_next()
}

function terminals_next()
{
  var done = true
  var elements = terminalElements;

  for (var i = 0; i < elements.length && done == true; i++)
  {
    var e = elements[i]

    e.i ++

    if (e.innerHTML.length >= e.completeHTML.length)
    {
      e.innerHTML = e.completeHTML
    }
    else
    {
      var s =  e.completeHTML.substring(0, e.i) 

      if (s.slice(-1) == " ") 
      {
        if(e.innerHTML.length % 6 == 0 ) { s = s + "" } else { s = s + "|" }
      }
      else
      {
        s = s + "|"
      }

      e.innerHTML = s
      e.parentNode.style.display = 'none'
      e.parentNode.style.display = 'block'
      done = false
    }
  }

  if (!done)
  {
    //window.clearInterval(terminalIntervalFunction)
    setTimeout(terminals_next, 300/20)
  }
}

terminals_init()

window.onload = function() { terminals_start() };
