var $ = document.querySelector.bind(document); var $$ = document.querySelectorAll.bind(document); Element.prototype.$ = function() { return this.querySelector.apply(this, arguments); }; Element.prototype.$$ = function() { return this.querySelectorAll.apply(this, arguments); };