I turned it into an actual plugin, so you dont actually have to go through this trouble of setting it up yourself Here!