1 2 3 4
// To use this, add this to /var/lib/git/static/cgit.js and set js=/cgit.js in your cgitrc. if ((/\/[^/]+\.git\/tree\/.*/iu).test(location.pathname)) { console.log('tree') }