mirror of
https://github.com/SoPat712/videospeed.git
synced 2025-08-22 02:18:45 -04:00
use mouse wheel scroll to increase/decrease speed
This commit is contained in:
@@ -121,6 +121,13 @@ chrome.extension.sendMessage({}, function(response) {
|
||||
</div>
|
||||
`;
|
||||
shadow.innerHTML = shadowTemplate;
|
||||
shadow.querySelector('#controller').addEventListener('wheel', (e) => {
|
||||
runAction(e.wheelDelta > 0 ? 'faster' : 'slower', document);
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
|
||||
shadow.querySelector('.draggable').addEventListener('mousedown', (e) => {
|
||||
runAction(e.target.dataset['action'], document);
|
||||
});
|
||||
|
Reference in New Issue
Block a user