<commit_before>/**
 * View for the room users list
 * @module views/pro/PlayHistoryView
 */
var panes = require('./panes');

var PlayHistoryView = Backbone.View.extend({

	id: "plugpro-play-history",
	className: "media-list history",

	initialize: function(){
		var JST = window.plugPro.JST;
		this.historyHTML = JST['play_history.html'];
	},
	
	render: function(){
		this.$el.html("");

		var historyList = API.getHistory();

		historyList.forEach( this.appendSong.bind(this) );
	},

	appendSong: function( songInfo ){

		var historyDiv = this.historyHTML( songInfo );

		this.$el.append( historyDiv );
	},

	destroy: function(){
		this.remove();
	},

	reposition: function(){
		var windowWidth = $(window).width();
		var windowHeight = $(window).height();

		var leftPosition = panes.get('userlist');
		var height = (windowHeight - 108) / 2;

		this.$el.css({
			"left": leftPosition + "px",<commit_msg>Make play history stay up to date<commit_after>/**
 * View for the room users list
 * @module views/pro/PlayHistoryView
 */
var panes = require('./panes');

var PlayHistoryView = Backbone.View.extend({

	id: "plugpro-play-history",
	className: "media-list history",

	initialize: function(){
		var JST = window.plugPro.JST;
		this.historyHTML = JST['play_history.html'];

		API.on( API.HISTORY_UPDATE, this.render.bind(this) );
	},
	
	render: function(){
		this.$el.html("");

		var historyList = API.getHistory();

		historyList.forEach( this.appendSong.bind(this) );
	},

	appendSong: function( songInfo ){

		var historyDiv = this.historyHTML( songInfo );

		this.$el.append( historyDiv );
	},

	destroy: function(){
		this.remove();
	},

	reposition: function(){
		var windowWidth = $(window).width();
		var windowHeight = $(window).height();

		var leftPosition = panes.get('userlist');
		var height = (windowHeight - 108) / 2;

		this.$el.css({
			"left": leftPosition + "px",
{'fraction_non_alphanumeric': 0.1685214626391097, 'fraction_numerical': 0.0042395336512983575, 'mean_word_length': 4.0212765957446805, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6701504', 'n_tokens_mistral': 678, 'n_tokens_neox': 609, 'n_words': 142}