User blog:Taldin/Tinker's Blog, Part 5:Journey to Mongo for Gems

Today's foray was a lot more daunting, but I've wanted a button to buy more than one gem at a time for some time.

One thing to remember is that any pull request that you make is a suggestion, and it is up to the developers to decide whether or not they take it or not. It can take some time (days or weeks) for them to even respond, because every code submission has to be reviewed and tested. (This one in particular probably needs some sort of unit test somewhere, but I have no idea how to make one.)

I had a lot of fun doing this, though, and for me it would be a very handy utility -- as a long term subscriber, my gem cap is at 50, so I have to click 'Buy 1 Gem' 50 times to get all of my gems.

Stuff that went into this suggested fix: This is one of those times where going into a lot of detail might go over most novice coder's heads, but if someone thinks it'll be helpful, feel free to comment. You'd have to know how I think in order to follow along, and I did some brute force iterative programming to get it to work.
 * Figuring out how to give myself a gemcap in Mongoose
 * Finding where the button for the market was (website\views\options\inventory\drops.jade) and adding one more button
 * Editing the user.ops.purchase code (common\script\index.js)
 * Adding a different label in the English label text (locales\en\subscriber.json)
 * Adding a new gem button so it clearly says 5 and rerunning the spritesmith
 * Adding a new CSS rule for the button (because apparently the button icon name is its own CSS rule)

Otherwise? Enjoy the button if they pick it up. :)