Update rnai.publish.js

Compressed the code further. DRY, DRY, DRY.