Merlin-R / User Cooldown Title

// ==UserScript==
// @name         User Cooldown Title
// @version      0.1
// @author       ----M----
// @copyright 2018, Merlin-R (https://openuserjs.org/users/Merlin-R)
// @license MIT
// @match        https://www.torn.com/profiles.php*
// @grant        none
// ==/UserScript==

(function () {
  'use strict';
  setTimeout(function () {
    setInterval(function () {
      var info = $('.main-desc').text().trim();
      var level = $('.box-info:not(.rank):not(.age) .box-value').text().trim();
      var name = $('#skip-to-content').text().trim().slice(0, -10);
      if (name.length > 8) name = name.substr(0, 6) + '...';
      var titleText = name + '(' + level + '): ';
      if (info.indexOf('hospital') != -1) {
        var time = {
          minute: "00",
          hour: "00",
          second: "00"
        };
        info.substr(16).replace(/([0-9]*) (hour|minute|second)/g, function (complete, digit, unit) {
          time[unit] = ('00' + digit).substr(-2);
        });
        titleText += (+(time.hour) ? time.hour + ':' : '') + time.minute /*+ ':' + time.second SECOND INACURATE*/ ;
      }
      else
        titleText += info;
      $('title').text(titleText);
    }, 1000);
  }, 5000);
})();