Last active
February 19, 2017 19:26
-
-
Save abcang/729d7125d00d89b0a48aff251ba2264c to your computer and use it in GitHub Desktop.
Himado hot key
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 Himado hot key | |
// @namespace https://abcang.net/ | |
// @version 0.2 | |
// @description enable hot key on himado | |
// @author ABCanG | |
// @match http://himado.in/* | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
var playerContainer = document.getElementById('playerContainer'); | |
if (!cmCanvas) { | |
return; | |
} | |
playerContainer.setAttribute('tabindex', 0); | |
playerContainer.addEventListener('keydown', function(e) { | |
e.preventDefault(); | |
window.html5Player.loadController.keyDown(e.keyCode); | |
}); | |
})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment