-
-
Save anonymous/2e2e4239830378b982e2f77aebe5c698 to your computer and use it in GitHub Desktop.
..minus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (function (root, factory) { | |
| if (typeof(define) === 'function' && define.amd) { | |
| define([], function() { return root.m = factory() }); | |
| } else if (typeof module === 'object' && module.exports) { | |
| module.exports = factory(); | |
| } else { | |
| root.m = factory(); | |
| } | |
| })(this, function(exports){ | |
| 'use strict'; | |
| function m(q,p,one) { | |
| var prop = 'querySelector' + (one ? '' : 'All'); | |
| return p instanceof Element ? | |
| p[prop](q) : document[prop](q); | |
| } | |
| m.one = function(q,p) { return m(q,p,true) } | |
| m.o = Object; | |
| m.oc = function(p,o){return m.o.create(p,o)} | |
| /* and so on */ | |
| return m; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment