fixed a bug where it was incorrectly doing a conditional check
edited readme to be a little more clear in vanilla JS usage