getGamepads not supported fix

for browsers that don't support navigator.getGamepads()

  1. // ==UserScript==
  2. // @name getGamepads not supported fix
  3. // @namespace http://bzzzzdzzzz.blogspot.com/
  4. // @description for browsers that don't support navigator.getGamepads()
  5. // @author BZZZZ
  6. // @include *
  7. // @version 0.1
  8. // @grant none
  9. // @run-at document-start
  10. // ==/UserScript==
  11.  
  12. if(typeof window.navigator.getGamepads!=="function")window.navigator.getGamepads=window.Array;