Created
April 30, 2020 22:11
-
-
Save alexkuc/bf8f70894b78f45a000905f32a78ec5b to your computer and use it in GitHub Desktop.
Open Trello card, hover over task item, press shift+F1… Now your task's text is copied to clipboard!
This file contains hidden or 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
// I have used this script with Tampermonkey to automatically inject it | |
const $ = window.$; | |
window.task = ''; | |
const bind = () => { | |
$('.checklist-item-details-text').each( (i, el) => { | |
if ( el.classList.contains('mouseenter-event') ) { return }; | |
$(el).mouseenter( e => { window.task = e.currentTarget.innerText } ); | |
el.classList.add('mouseenter-event'); | |
}); | |
}; | |
$(document).keydown( e => { | |
if (e.keyCode === 112 && e.shiftKey) { navigator.clipboard.writeText(window.task) } | |
}); | |
function check() { | |
if ($('body.window-up').length) { | |
bind(); | |
return setTimeout(check, 1000); | |
} | |
return setTimeout(check, 1000); | |
} | |
check(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment