This time I come with a brand new kind of thing. A fully fledged JS module! There's not too much to explain, and I'm gonna be honest, it's pretty late right now...
Great work, very useful.