TeamWork - Dashboard Links Mod

Change the "Dashboard" link to direct to "Today's Tasks" by default

目前為 2015-02-17 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name TeamWork - Dashboard Links Mod
  3. // @namespace http://teamworkmods.lukebutler.com
  4. // @version 1.3
  5. // @description Change the "Dashboard" link to direct to "Today's Tasks" by default
  6. // @match https://*.teamwork.com/*
  7. // @copyright 2015+, Luke Butler
  8. // ==/UserScript==
  9.  
  10. var i = 0;
  11. var dashboardButton;
  12. while(i==0){
  13. dashboardButton = document.getElementById("tl_dashboard");
  14. if (typeof(dashboardButton) != 'undefined' && dashboardButton != null){
  15. var i = 1;
  16. var dashboardLink = dashboardButton.getElementsByClassName("ql")[0];
  17. dashboardLink.setAttribute("href", "dashboard?display=todaystasks");
  18. dashboardLink.innerHTML = "Today's Tasks";
  19. }
  20. }