Simplify github.js code