Greasy Fork镜像 is available in English.

Toggl-Button Gitlab

Toggl (see http://toggl.com) is an online time tracking platform and this user script integrates it so that you can easily start and stop time entries and quickly recognize which task is currently active. More details can be found at https://github.com/jurgenhaas/toggl-button-greasemonkey

06.07.2015 itibariyledir. En son verisyonu görün.

// ==UserScript==
// @name        Toggl-Button Gitlab
// @namespace   https://github.com/jurgenhaas/toggl-button-greasemonkey
// @version     1.2
// @include     http*://gitlab.com/*
// @grant       GM_xmlhttpRequest
// @grant       GM_addStyle
// @grant       GM_getResourceText
// @grant       GM_getValue
// @grant       GM_setValue
// @grant       GM_info
// @grant       GM_registerMenuCommand
// @require     https://greasyfork.dpdns.org/scripts/2670-toggllibrary/code/TogglLibrary.js
// @resource    togglStyle https://raw.githubusercontent.com/jurgenhaas/toggl-button-greasemonkey/v1.1/TogglLibrary.css
// @description Toggl (see http://toggl.com) is an online time tracking platform and this user script integrates it so that you can easily start and stop time entries and quickly recognize which task is currently active. More details can be found at https://github.com/jurgenhaas/toggl-button-greasemonkey
// ==/UserScript==

new TogglButtonGM('.issue-details', function (elem) {
  var description, projectIds = [],
    numElem = elem.querySelector('.page-title', elem),
    titleElem = elem.querySelector('.issue-box .title, .issue-title', elem),
    projectElem = document.querySelector('.title');

  description = titleElem.textContent.trim();
  if (numElem !== null) {
    description = numElem.childNodes[2].nodeValue.trim() + " " + description;
  }

  if (projectElem !== null) {
    projectIds.push(projectElem.textContent.trim());
  }

  return {
    className: 'gitlab',
    description: description,
    projectIds: projectIds
  };
});
长期地址
遇到问题?请前往 GitHub 提 Issues,或加Q群1031348184

赞助商

Fishcpy

广告

Rainyun

注册一下就行

Rainyun

一年攒够 12 元