TeamWork - Dashboard Links Mod

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

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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";
  }
}