src/js/social-share.js
function selector(str) {
        var elems = [];

        each(str.split(/\s*,\s*/), function(s) {
            var m = s.match(/([#.])(\w+)/);
            if (m === null) {
                throw Error('Supports only simple single #ID or .CLASS selector.');
            }

            if (m[1]) {
                var elem = document.getElementById(m[2]);

                if (elem) {
                    elems.push(elem);
                }
            }

            elems = elems.concat(getElementsByClassName(str));
        });

        return elems;
    }
function selector(str) {
        var elems = [];

        each(str.split(/\s*,\s*/), function(s) {
            var m = s.match(/([#.])(\w+)/);
            if (m === null) {
                throw Error('Supports only simple single #ID or .CLASS selector.');
            }

            if (m[1]) {
                var elem = document.getElementById(m[2]);

                if (elem) {
                    elems.push(elem);
                }
            }

            elems = elems.concat(getElementsByClassName(str));
        });

        return elems;
    }
function selector ( str ) { var elems = [ ] ; each ( str . split ( / \s*,\s* / ) , function ( s ) { var m = s . match ( / ([#.])(\w+) / ) ; if ( m === null ) { throw Error ( 'Supports only simple single #ID or .CLASS selector.' ) ; } if ( m [ 1 ] ) { var elem = document . getElementById ( m [ 2 ] ) ; if ( elem ) { elems . push ( elem ) ; } } elems = elems . concat ( getElementsByClassName ( str ) ) ; } ) ; return elems ; }
Simple selector.

@param {String} str #ID or .CLASS

@returns {Array}
Simple selector .