factored browser code out of tabcat/scoring.coffee