<commit_before><html>
<head>
<title>Notebook</title>
<link rel='stylesheet' type='text/css' href='css.css' />
<link rel="stylesheet" type="text/css" href="https://google-developers.appspot.com/maps/documentation/javascript/examples/default.css" />
<script type="text/javascript" src="utils/json2.js"></script>
<script type="text/javascript" src="utils/nbutils.js"></script>
<script type="text/javascript" src="views.js"></script>
<script type="text/javascript" src="model.js"></script>
<script type="text/javascript" src="controller.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">

window.addEventListener('load', pageLoad, false);
//Defining here to make available to everyone
var model;
var controller;

function pageLoad()
{
    //Initialize stuff
    controller = new Controller();
    model = new Model();
    var gameId;
    var playerId;
    if(gameId = parseInt(parseURLParams(document.URL).gameId))
    {
        playerId = parseInt(parseURLParams(document.URL).playerId);
        startLoadGame(gameId, playerId);
    }
    else
        document.getElementById('message').innerHTML = "<form>Game Id:<input type='text' id='game_id_form'/><input type='button' value='Submit' onClick='submitForm();'/></form>";

    if (navigator.appName == 'Microsoft Internet Explorer') 
        alert('You might need to install quicktime to properly view some media.\n(http://www.apple.com/quicktime/download)');
}

function submitForm()
{
    var gameId;
    if(gameId = document.getElementById('game_id_form').value)
        loadGame(gameId);
    else
        alert("Please Enter a Valid Game ID");
}

function startLoadGame(gameId, playerId)
{
    document.getElementById('message').innerHTML = "&nbsp; <img height='12px' src='spinner.gif'></img> Waiting on Server...";
    var bpRequestObject = new Object();
    bpRequestObject.gameId = gameId;
    bpRequestObject.items = false;//Don't get items
    bpRequestObject.attributes = false;//Don't get attributes
    if(playerId) bpRequestObject.playerArray = playerId;
    callService("players.getPlayerBackpacksFromArray", finishLoadGame, '', JSON.stringify(bpRequestObject));
}
function finishLoadGame(responseText)
{
    responseData=JSON.parse(responseText);
    alert(responseText);
    if(responseData.returnCode == 1) //Error
    {
        document.getElementById('message').innerHTML = responseData.data;	
        return;
    }

    model.gameJSONText = responseText;
    model.gameData = responseData.data;

    //Initialize a few views
    model.views.contributorMapFilterSelector.appendChild(model.views.defaultContributorMapFilterSelectorCell);
    model.views.contributorMapFilterSelector.appendChild(model.views.helperContributorMapFilterSelectorCell);
    model.views.tagMapFilterSelector.appendChild(model.views.defaultTagMapFilterSelectorCell);
    model.views.tagMapFilterSelector.appendChild(model.views.helperTagMapFilterSelectorCell);
    model.views.contributorListFilterSelector.appendChild(model.views.defaultContributorListFilterSelectorCell);
    model.views.contributorListFilterSelector.appendChild(model.views.helperContributorListFilterSelectorCell);
    model.views.tagListFilterSelector.appendChild(model.views.defaultTagListFilterSelectorCell);
    model.views.tagListFilterSelector.appendChild(model.views.helperTagListFilterSelectorCell);
    model.views.noteListSelector.appendChild(model.views.defaultNoteListSelectorCell);

    //  Simulate clicking of sort button then layout button to set initial state
    model.views.contributorSortButton.select();
    model.views.mapLayoutButton.select();
    
    controller.populateModel(model.gameData);
<commit_msg>removed debug alert<commit_after><html>
<head>
<title>Notebook</title>
<link rel='stylesheet' type='text/css' href='css.css' />
<link rel="stylesheet" type="text/css" href="https://google-developers.appspot.com/maps/documentation/javascript/examples/default.css" />
<script type="text/javascript" src="utils/json2.js"></script>
<script type="text/javascript" src="utils/nbutils.js"></script>
<script type="text/javascript" src="views.js"></script>
<script type="text/javascript" src="model.js"></script>
<script type="text/javascript" src="controller.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">

window.addEventListener('load', pageLoad, false);
//Defining here to make available to everyone
var model;
var controller;

function pageLoad()
{
    //Initialize stuff
    controller = new Controller();
    model = new Model();
    var gameId;
    var playerId;
    if(gameId = parseInt(parseURLParams(document.URL).gameId))
    {
        playerId = parseInt(parseURLParams(document.URL).playerId);
        startLoadGame(gameId, playerId);
    }
    else
        document.getElementById('message').innerHTML = "<form>Game Id:<input type='text' id='game_id_form'/><input type='button' value='Submit' onClick='submitForm();'/></form>";

    if (navigator.appName == 'Microsoft Internet Explorer') 
        alert('You might need to install quicktime to properly view some media.\n(http://www.apple.com/quicktime/download)');
}

function submitForm()
{
    var gameId;
    if(gameId = document.getElementById('game_id_form').value)
        loadGame(gameId);
    else
        alert("Please Enter a Valid Game ID");
}

function startLoadGame(gameId, playerId)
{
    document.getElementById('message').innerHTML = "&nbsp; <img height='12px' src='spinner.gif'></img> Waiting on Server...";
    var bpRequestObject = new Object();
    bpRequestObject.gameId = gameId;
    bpRequestObject.items = false;//Don't get items
    bpRequestObject.attributes = false;//Don't get attributes
    if(playerId) bpRequestObject.playerArray = playerId;
    callService("players.getPlayerBackpacksFromArray", finishLoadGame, '', JSON.stringify(bpRequestObject));
}
function finishLoadGame(responseText)
{
    responseData=JSON.parse(responseText);
    if(responseData.returnCode == 1) //Error
    {
        document.getElementById('message').innerHTML = responseData.data;	
        return;
    }

    model.gameJSONText = responseText;
    model.gameData = responseData.data;

    //Initialize a few views
    model.views.contributorMapFilterSelector.appendChild(model.views.defaultContributorMapFilterSelectorCell);
    model.views.contributorMapFilterSelector.appendChild(model.views.helperContributorMapFilterSelectorCell);
    model.views.tagMapFilterSelector.appendChild(model.views.defaultTagMapFilterSelectorCell);
    model.views.tagMapFilterSelector.appendChild(model.views.helperTagMapFilterSelectorCell);
    model.views.contributorListFilterSelector.appendChild(model.views.defaultContributorListFilterSelectorCell);
    model.views.contributorListFilterSelector.appendChild(model.views.helperContributorListFilterSelectorCell);
    model.views.tagListFilterSelector.appendChild(model.views.defaultTagListFilterSelectorCell);
    model.views.tagListFilterSelector.appendChild(model.views.helperTagListFilterSelectorCell);
    model.views.noteListSelector.appendChild(model.views.defaultNoteListSelectorCell);

    //  Simulate clicking of sort button then layout button to set initial state
    model.views.contributorSortButton.select();
    model.views.mapLayoutButton.select();
    
    controller.populateModel(model.gameData);

{'fraction_non_alphanumeric': 0.12887220061687005, 'fraction_numerical': 0.001072817486925037, 'mean_word_length': 5.163636363636364, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 53, 'https://': 4, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7050858', 'n_tokens_mistral': 2116, 'n_tokens_neox': 2068, 'n_words': 355}