Skip to content

Instantly share code, notes, and snippets.

@romuald
Last active April 1, 2022 14:24
Show Gist options
  • Save romuald/57c28352911313524f10 to your computer and use it in GitHub Desktop.
Save romuald/57c28352911313524f10 to your computer and use it in GitHub Desktop.
Trello horizontal wheel scroll
// ==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);
@bentalgad
Copy link

How do i install it. i really need this. can you make a chrome extention?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment