Update main.js

This is a size improvement over repeated document.querySelector calls, aiming to better shrink once passed through minifiers.
The script is small already but being a base reference, why not smaller, if it's possible keeping it clean?
you see? you've just introduced 14.5Kb extra and mandatory as script on top to the project instead of [just 3](https://github.com/WebReflection/dom4/blob/master/build/dom4.js) :P