Skip to content

Instantly share code, notes, and snippets.

@chomamateusz
Last active January 7, 2019 07:10
Show Gist options
  • Save chomamateusz/2cc64fc6b3cff2f1c41c9eb1bcad79bb to your computer and use it in GitHub Desktop.
Save chomamateusz/2cc64fc6b3cff2f1c41c9eb1bcad79bb to your computer and use it in GitHub Desktop.
Asana - see only tasks assigned to me in project board
// 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