<commit_before>/*jslint indent: 2, unparam: true*/
/*global $: false, document: false, togglbutton: false*/

'use strict';

togglbutton.render('.issue .detail-page-description .title:not(.toggl)', {observe: true}, function (elem) {
  var link, description,
    numElem = $(".identifier"),
    titleElem = $(".issue .detail-page-description .title"),
    projectElem = $('.title').firstChild;

  description = titleElem.textContent.trim();

  if (numElem !== null) {
    description = "#" + numElem.innerText.split("#").pop().trim() + " " + description;
  }
  link = togglbutton.createTimerLink({
    className: 'gitlab',
    description: description,
    projectName: projectElem.textContent.split(' / ').pop().split(' · ')[0]
  });

  $('.issue .detail-page-description h2.title').appendChild(link);
});<commit_msg>Fixed Gitlab integration, closes #537<commit_after>/*jslint indent: 2, unparam: true*/
/*global $: false, document: false, togglbutton: false*/

'use strict';

togglbutton.render('.issue-details .detail-page-description:not(.toggl)', {observe: true}, function (elem) {
  var link, description,
    numElem = $(".identifier"),
    titleElem = $(".title", elem),
    projectElem = $("h1 .project-item-select-holder");

  description = titleElem.textContent.trim();

  if (numElem !== null) {
    description = numElem.innerText.split(" ").pop().trim() + " " + description;
  }

  link = togglbutton.createTimerLink({
    className: 'gitlab',
    description: description,
    projectName: projectElem.textContent
  });

  $(".detail-page-header").appendChild(link);
});
{'fraction_non_alphanumeric': 0.18761844598862917, 'fraction_numerical': 0.00505369551484523, 'mean_word_length': 4.245033112582782, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6318921', 'n_tokens_mistral': 503, 'n_tokens_neox': 491, 'n_words': 105}