<commit_before>
// create global API object
var plugPro = window.plugPro = {};
plugPro.updates = require("./updates");

// Load html templates
var JST = require("./templates");

var Room = require('./Room');
var room = new Room();

room.on("load", function(){

	plugPro.version = $('#plug_pro_chrome_extension_version').val();
	plugPro.id = $('#plug_pro_chrome_extension_id').val();

	var Menu = require('./views/MenuView');
	var ViewButtonsView = require('./views/ViewButtonsView');

	var Toggle = require('./settings/Toggle');
	var AutoWootToggle = require('./settings/AutoWootToggle');
	var ChatImagesToggle = require('./settings/ChatImagesToggle');

	var storage = require('./storage/storage');
	storage.init();

	var userId = API.getUser().id;

	// Autowoot
	var awToggle = new Toggle( true, "autowoot" );
	var autowootToggle = new AutoWootToggle( awToggle, userId );

	// Chat images
	var ciToggle = new Toggle( true, "chatImages" );
	var chatImagesToggle = new ChatImagesToggle( ciToggle, userId );

	// Add PlugPro menu
	var menu = new Menu( {
		toggleSettings: {
			"AutoWoot": autowootToggle,
			"Chat Images": chatImagesToggle
		}
	});
	$('#app-menu').append( menu.$el );
	menu.render();

	plugPro.settings = {
		autowoot: autowootToggle
	}

	var buttonView = new ViewButtonsView();
	$('#room').append( buttonView.el );
	buttonView.render();


	var lastVersionUsed = storage.getVersion();
	if( window.plugPro.updates[ plugPro.version ] && lastVersionUsed !== plugPro.version ){
		var UpdatesModalView = require('./views/UpdatesModalView');
		var updatesModalView = new UpdatesModalView();
		$('body').append( updatesModalView.el );
		updatesModalView.render();
	}

});
room.init();<commit_msg>Mute / Unmute audio via spacebar<commit_after>
// create global API object
var plugPro = window.plugPro = {};
plugPro.updates = require("./updates");

// Load html templates
var JST = require("./templates");

var Room = require('./Room');
var room = new Room();

room.on("load", function(){

	plugPro.version = $('#plug_pro_chrome_extension_version').val();
	plugPro.id = $('#plug_pro_chrome_extension_id').val();

	var Menu = require('./views/MenuView');
	var ViewButtonsView = require('./views/ViewButtonsView');

	var Toggle = require('./settings/Toggle');
	var AutoWootToggle = require('./settings/AutoWootToggle');
	var ChatImagesToggle = require('./settings/ChatImagesToggle');

	var storage = require('./storage/storage');
	storage.init();

	var userId = API.getUser().id;

	// Autowoot
	var awToggle = new Toggle( true, "autowoot" );
	var autowootToggle = new AutoWootToggle( awToggle, userId );

	// Chat images
	var ciToggle = new Toggle( true, "chatImages" );
	var chatImagesToggle = new ChatImagesToggle( ciToggle, userId );

	// Add PlugPro menu
	var menu = new Menu( {
		toggleSettings: {
			"AutoWoot": autowootToggle,
			"Chat Images": chatImagesToggle
		}
	});
	$('#app-menu').append( menu.$el );
	menu.render();

	plugPro.settings = {
		autowoot: autowootToggle
	}

	var buttonView = new ViewButtonsView();
	$('#room').append( buttonView.el );
	buttonView.render();


	var lastVersionUsed = storage.getVersion();
	if( window.plugPro.updates[ plugPro.version ] && lastVersionUsed !== plugPro.version ){
		var UpdatesModalView = require('./views/UpdatesModalView');
		var updatesModalView = new UpdatesModalView();
		$('body').append( updatesModalView.el );
		updatesModalView.render();
	}
	
	// Mute / Unmute audio via spacebar
	$('body').on('keyup',function(e){
		console.log(e);

		// Make sure focus isn't on an input
		if ( e.keyCode != 32 || $(e.target).prop('tagName') != 'BODY' ){
			return true;
		}
		
		var current_volume = API.getVolume();
		var unmuted_volume = 75;
		if ( $(this).data('volume') ) {
			unmuted_volume = $(this).data('volume');
		}

		// Check if muting or unmuting
		if ( current_volume == 0 ) {
			API.setVolume(unmuted_volume);
		} else {
			API.setVolume(0);
			$(this).data('volume',current_volume);
		}
		return true;
	});

});
room.init();
{'fraction_non_alphanumeric': 0.16670838548185232, 'fraction_numerical': 0.001501877346683354, 'mean_word_length': 4.342245989304812, 'pattern_counts': {'":': 4, '<': 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': '2704473', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1280, 'n_words': 294}