3 ms·
Not quite as pretty, but here's a bookmarklet that allows you to go back by one commit in the github.com blame view (e.g. https://github.com/babel/babel/blame/m
by mhw 8y ago
Not quite as pretty, but here's a bookmarklet that allows you to go back by one commit in the github.com blame view (e.g. https://github.com/babel/babel/blame/master/packages/babel-core/test/browserify.js https://github.com/babel/babel/blame/master/packages/babel-c...). It basically finds the most recent 'View blame prior to this commit' link and follows it.
javascript:(function(l){l.host.match('github.com') && (l.href = Array.prototype.slice.apply(document.querySelectorAll('.blame-hunk')).map((d) => [new Date(d.querySelector(".blame-commit-date time-ago").getAttribute('datetime')), d.querySelector(".blob-reblame a") && d.querySelector(".blob-reblame a").getAttribute('href')]).sort((a,b) => a[0] < b[0])[0][1])})(window.location);