Last active
February 23, 2021 16:54
-
-
Save xandout/9532ef97be22f7557483 to your computer and use it in GitHub Desktop.
Enable horizontal scrolling on Trello boards
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
//To create a bookmarklet just append javascript: to this code and set as the URL in a new bookmark | |
var el = document.getElementById('board'); | |
el.className += " trello-scroll"; | |
document.addEventListener("wheel", function(e){ | |
var under = document.elementFromPoint(e.clientX, e.clientY); | |
if(hasClass(under, "list-wrapper") || hasClass(under, "trello-scroll")){ | |
if((e.wheelDelta>0?"left":"right") == "right"){ | |
el.scrollLeft += 10; | |
} else { | |
el.scrollLeft -= 10; | |
}; | |
}; | |
}); | |
function hasClass(el, cls) { | |
return el.className && new RegExp("(\\s|^)" + cls + "(\\s|$)").test(el.className); | |
}; |
How do i install it. i really need this. can you make a chrome extention?
How do i install it. i really need this. can you make a chrome extention?
To use a script like this, install a browser extension like Tampermonkey.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks @GUTTMANN!! Brain fart made me write code.