Last active
April 1, 2022 14:24
-
-
Save romuald/57c28352911313524f10 to your computer and use it in GitHub Desktop.
Trello horizontal wheel scroll
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
// ==UserScript== | |
// @name Trello horizontal wheel scroll | |
// @namespace http://chivil.com/ | |
// @downloadUrl https://gist.github.com/romuald/57c28352911313524f10/raw | |
// @version 0.9 | |
// @description Scroll horizontally when using mouse wheel | |
// @author Romuald Brunet | |
// @match https://trello.com/b/* | |
// @grant none | |
// ==/UserScript== | |
var checkcount = 0; | |
function attachEvent() { | |
var $board = jQuery("#board"); | |
if ( $board.length == 0 ) { | |
if ( ++checkcount < 100 ) { | |
window.setTimeout(attachEvent, 200); | |
} | |
return; | |
} | |
$board.mousewheel(function(event, delta) { | |
if (event.target === this) { | |
this.scrollLeft -= (delta * 50); | |
event.preventDefault(); | |
} | |
}); | |
} | |
window.setTimeout(attachEvent, 200); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How do i install it. i really need this. can you make a chrome extention?