Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save tksugimoto/63dddbf6be24524fbedd6bc5d0141e57 to your computer and use it in GitHub Desktop.
Save tksugimoto/63dddbf6be24524fbedd6bc5d0141e57 to your computer and use it in GitHub Desktop.
ニコニコ生放送用
document.querySelector('[class^="___player-display-footer___"]').addEventListener('wheel', evt => {
/* 回転方向:上 = +1(正), 下 = -1(負) */
const sign = Math.sign(evt.wheelDelta);
const video = document.querySelector('video');
video.currentTime -= 5 * sign;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment