Asana

None

目前為 2019-09-13 提交的版本,檢視 最新版本

// ==UserScript==
// @name         Asana
// @namespace    http://
// @version      2.0.0
// @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 { 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);
    //--

})();

QingJ © 2025

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