diff --git a/index.html b/index.html index f5818fe..2ee5690 100644 --- a/index.html +++ b/index.html @@ -62,6 +62,7 @@ + diff --git a/js/gamepad.js b/js/gamepad.js index 0d06c18..2bf402d 100644 --- a/js/gamepad.js +++ b/js/gamepad.js @@ -1,12 +1,3 @@ -$.urlParam = function(name) { - let results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); - if (results === null) { - return null; - } else { - return decodeURIComponent(results[1]) || 0; - } -}; - class Gamepad { constructor() { this.haveEvents = 'ongamepadconnected' in window; diff --git a/js/urlParam.jquery.js b/js/urlParam.jquery.js new file mode 100644 index 0000000..1208f85 --- /dev/null +++ b/js/urlParam.jquery.js @@ -0,0 +1,8 @@ +$.urlParam = function(name) { + let results = new RegExp('[\?&]' + name + '=([^&#]*)').exec(window.location.href); + if (results === null) { + return null; + } else { + return decodeURIComponent(results[1]) || 0; + } +}; \ No newline at end of file