Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function canGame() {
- return "getGamepads" in navigator;
- }
- $(document).ready(function() {
- if(canGame()) {
- $(window).on("gamepadconnected", function() {
- console.log("connection event");
- });
- $(window).on("gamepaddisconnected", function() {
- $("#gamepadPrompt").text(prompt);
- });
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement