Automatic colspan subtask on each project when you click

Hello everyone,

Today I share a tips that I think maybe useful for someone. When you click on a project, on a list views. There are some task with subtasks default does not colspan, with this you can automatically span it

First, install this one Run Javascript - Chrome Web Store

Then paste this code, click allow app.asana.com on top right, then enjoy it

const sleep = (milliseconds) => {

return new Promise(resolve => setTimeout(resolve, milliseconds))
}

ts = () => {
return Math.round((new Date()).getTime() / 1000);
}

async function a() {
let items = ;

document.querySelectorAll('.SpreadsheetTaskList .ProjectSpreadsheetGridRow-subtaskToggleButton').forEach(async function(item) {
    items.push(item);
});


for(var i=0; i<items.length; i++) {
    items[i].click();
    await sleep(600);
}

}

let u = window.location.href;

async function b() {
a();
while(1) {
let u1 = window.location.href;
if (u1 != u && u1.indexOf(‘list’) != -1) {
a();
u = u1;
}
await sleep(1000);
}
} b();

Sorry, you can use this const sleep = (milliseconds) => { return new Promise(resolve => setTimeout(re - Pastebin.com

I can not format this code on the forum