Writing plugin only in JavaScript (no-jQuery)