Last active
October 10, 2016 15:15
-
-
Save harriha/05bf241e923a1403eb88 to your computer and use it in GitHub Desktop.
Flowdock zen mode toggle
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
/* | |
Hide Flowdock flows temporarily. | |
Useful for having a separate "zen mode" while keeping | |
the Flowdock tab open, optionally keeping only selected set of flows visible always. | |
My use case: when working, keep only primary project flow(s) visible and hide others, | |
while still allowing easy access to all flows when desired. | |
How-to: Add the following piece of code as a bookmarklet to your browser. | |
- Optionally, add the flow names you want to keep always visible to the KEEP array. | |
- All 1-to-1 flows are always visible. | |
Works in the latest Chrome and in other modern browsers as well, but didn't bother | |
to care about extensive browser support. | |
Known issues: | |
- Doesn't hide the 'new notification' marker from the tab | |
*/ | |
javascript:var KEEP=['my-flow'];Array.from(document.querySelectorAll('.org-flows .flow-tab .tab-link')).filter(function (el) { return !KEEP.includes(el.href.split('/').slice(-1)[0]) }).forEach(function (el) { el.parentElement.style.display = el.parentElement.style.display === 'none' ? 'inherit' : 'none' }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment