Use variable or property names that make sense but use a shorthand if you can. Comment your code if it's unclear. Definitely avoid hungarian notation. I have a shorthand that I commonly use that's intuitive to me.
s is string,
o is object,
el is element,
els is a collection of elements. Pick what works for you but don't be overly verbose (eg: getAllElementsWithClassNameHide) when you can do something shorter (eg: getHidden).
Take out any code you're not actually using. Use a versioning system in your development process so you don't feel like you might lose something you might need down the road.
This is probably a no-brainer but make functions of commonly used code. Reduce repetitive code into a single call.
Store lengthy references that are used more than once in a small variable name and use that instead. (Bonus: it'll likely speed the performance of your app as references won't be looked up repeatedly.)
Recognize code repetition and simplify it. Possibly move it into its own function or set it up to pass a variable or two in, instead of forking the code using if/else or switch statements.
And finally, it's important to recycle. Take what you've got and give it back to the world for others to reuse and do the same of others. No need to reinvent the wheel all the time (as programmers, I think it's in our nature to do this).
Yes, using a library may lead to having more than you need to accomplish the job (aka, bloat) but all you need to do is repeat the environmental cycle: reduce, reuse, recycle.