Introduction to Asana bookmarklets

Here is a fixed version (works on the project view, only if there isn’t a task open)

javascript: (() => {
    const filterMenu = [...document.querySelectorAll('.PageToolbarStructure-rightChildren div')]
        .find((node) => node.innerText.startsWith('Filter'));
    filterMenu.click();
    setTimeout(() => {
        const filterMenuContents = document.querySelector('.FilterMenuContents');
        if (filterMenuContents) {
            const removeButton = filterMenuContents.querySelector('.RemoveButton');
            removeButton.click();
        } else {
            const justMyTasks = document.getElementById('view_options_filter_Just my tasks');
            if (justMyTasks) {
                justMyTasks.click();
            }
        }
    }, 250);
})()

1 Like