TeamWork - Dashboard Links Mod

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

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name       TeamWork - Dashboard Links Mod
// @namespace  http://teamworkmods.lukebutler.com
// @version    1.3
// @description  Change the "Dashboard" link to direct to "Today's Tasks" by default
// @match      https://*.teamwork.com/*
// @copyright  2015+, Luke Butler
// ==/UserScript==

var i = 0;
var dashboardButton;
while(i==0){
  dashboardButton = document.getElementById("tl_dashboard");
  if (typeof(dashboardButton) != 'undefined' && dashboardButton != null){
    var i = 1;
    var dashboardLink = dashboardButton.getElementsByClassName("ql")[0];
    dashboardLink.setAttribute("href", "dashboard?display=todaystasks");
    dashboardLink.innerHTML = "Today's Tasks";
  }
}