Skip to content

Instantly share code, notes, and snippets.

@matthewfallshaw
Created June 19, 2023 07:41
Show Gist options
  • Save matthewfallshaw/befd240410ceb22e8cdc585bff07c0c7 to your computer and use it in GitHub Desktop.
Save matthewfallshaw/befd240410ceb22e8cdc585bff07c0c7 to your computer and use it in GitHub Desktop.
Expands the width of the sidebar in Asana. Requires a userscript manager such as [Tampermonkey](https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo).
// ==UserScript==
// @name Asana Sidebar Expander
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Expands the width of the sidebar in Asana
// @author YourName
// @match https://app.asana.com/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
// Function to expand the sidebar
function expandSidebar() {
// Select the sidebar element
var sidebar = document.getElementById('asana_sidebar');
// If the sidebar exists, set its width to 300px
if (sidebar) {
sidebar.style.width = '300px';
// Also adjust the width of the inner div
var innerDiv = sidebar.querySelector('.SidebarResizableContainer-sidebarWrapper');
if (innerDiv) {
innerDiv.style.flex = '0 0 300px';
}
// Stop checking if the sidebar is expanded
clearInterval(sidebarCheck);
}
}
// Check every 500ms if the sidebar has loaded
var sidebarCheck = setInterval(expandSidebar, 500);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment