Toggl-Button Trello

Toggle button for Trello

  1. // ==UserScript==
  2. // @name Toggl-Button Trello
  3. // @namespace https://gitlab.paragon-es.de/toggl-button
  4. // @version 0.9
  5. // @include http*://trello.com/*
  6. // @grant GM_xmlhttpRequest
  7. // @grant GM_addStyle
  8. // @grant GM_getResourceText
  9. // @grant GM_getValue
  10. // @grant GM_setValue
  11. // @grant GM_info
  12. // @grant GM_registerMenuCommand
  13. // @require https://gf.qytechs.cn/scripts/2670-toggllibrary/code/TogglLibrary.js
  14. // @resource togglStyle https://gitlab.paragon-es.de/toggl-button/core/raw/master/TogglLibrary.css
  15. // @description Toggle button for Trello
  16. // ==/UserScript==
  17.  
  18. new TogglButtonGM('.card-detail-window', function (elem) {
  19. var description, projectIds = [],
  20. id = null,
  21. titleElem = elem.querySelector('h2.card-detail-title-assist'),
  22. projectElem = elem.querySelector('.window-header-inline-content p a');
  23.  
  24. description = titleElem.textContent.trim();
  25. if (id !== null) {
  26. description = id.textContent.trim() + " " + description;
  27. }
  28.  
  29. if (projectElem !== null) {
  30. projectIds.push(projectElem.textContent.trim());
  31. }
  32. console.log(description);
  33. console.log(projectIds);
  34. return {
  35. className: 'trello',
  36. description: description,
  37. projectIds: projectIds
  38. };
  39. });

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址