Last active
January 7, 2019 07:10
-
-
Save chomamateusz/2cc64fc6b3cff2f1c41c9eb1bcad79bb to your computer and use it in GitHub Desktop.
Asana - see only tasks assigned to me in project board
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// copy-paste to browser console ;) | |
// you MUST have an avatar if you want to use this script! | |
(() => { | |
const topRightUserAvatarSelector = '.Avatar.Avatar--small.TopbarPageHeaderGlobalActions-settingsMenuAvatar' | |
const sortableCardSelector = '.BoardCardWithCustomProperties' | |
const sortableCardAvatarSelector = '.Avatar.Avatar--small.DomainUserAvatar-avatar' | |
const baseImgURL = | |
document.querySelector(topRightUserAvatarSelector) | |
.style.backgroundImage | |
.replace('url("', '') | |
.replace('_60x60.png")', '') | |
document.querySelectorAll(sortableCardSelector) | |
.forEach(card => { | |
const imgDiv = card.querySelector(sortableCardAvatarSelector) | |
if (imgDiv === null || imgDiv.style.backgroundImage.indexOf(baseImgURL) === -1) { | |
card.style.display = 'none' | |
} | |
}) | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment