None
当前为
// ==UserScript==
// @name Asana
// @namespace http://
// @version 2.0.1
// @description None
// @author Wes Foster
// @match https://app.asana.com/*
// @grant GM_addStyle
// ==/UserScript==
(function() {
'use strict';
// Remove Elements: TopBar, Portfolios Section
GM_addStyle("#topbar, .SidebarTopNavLinks-myPortfoliosbutton, .HarvestButton, .TopbarPageHeaderGlobalActions-upgradeButton, .TaskPremiumFeaturesSection { display: none !important; }");
// Expand width of project description sidebar
GM_addStyle(".ProjectSideRail {width:35% !important;} .ql-editor{overflow:auto !important}");
// Remove the "see more" project description link
GM_addStyle(".ProjectSideRailDescription-seeMoreLink {display:none !important}");
//--
// Recurring Interval in Asana
var timerID = setInterval(performIntervalActions, 1000);
function performIntervalActions() {
var i;
// Expand "Show More Projects"
var projectLink = document.getElementsByClassName("SidebarTeamDetailsProjectsList-showMoreProjectsLink");
for (i = 0; i < projectLink.length; i++) {
projectLink[i].click();
}
// Expand Project Description
var projectDescBox = document.getElementsByClassName('ql-editor');
var sidebarHeightRestriction = 137; // Roughly the height of the header toolbar and margins
for (i = 0; i < projectDescBox.length; i++) {
projectDescBox[i].style.maxHeight = (document.getElementsByClassName('ProjectPageView')[0].clientHeight - sidebarHeightRestriction) + "px";
}
}
setTimeout(function(){ clearInterval(timerID);} , 30000);
//--
})();