Math.TAU = Math.PI*2; // i'm twice the number you'll ever be // The poor man's jQuery function $(query){ return document.querySelector(query); } function $all(query){ return [].slice.call(document.querySelectorAll(query)); } function _getQueryVariable(name){ var query = window.location.search.substring(1); var vars = query.split("&"); for(var i=0;i