<commit_before>window.onload = function() {

  alert( "welcome" );

  $( document ).ready(function () {

    var thermostat = new Thermostat();

    $("#temperature").text( thermostat.getCurrentTemperature());

    $("#temperature_up").click( function () {
      thermostat.upButton();
      $("#temperature").text( thermostat.getCurrentTemperature());
    });

    $("#temperature_down").click( function () {
      thermostat.downButton();
      $("#temperature").text( thermostat.getCurrentTemperature());
    });

    $("#power_saving_status").text( thermostat.isPowerSavingOn());

    $("#power_saving_switch").click( function () {
      thermostat.powerSavingSwitch();
        $("#power_saving_status").text( thermostat.isPowerSavingOn());
    });

    $("#temperature_reset").click( function () {
      thermostat.resetButton();
      $("#temperature").text( thermostat.getCurrentTemperature());
    });









  });

};<commit_msg>adds color to the thermostat<commit_after>window.onload = function() {

  alert( "welcome" );

  $( document ).ready(function () {

    var thermostat = new Thermostat();

      $("#temperature").text( thermostat.getCurrentTemperature());
      $("#temperature").css('color', 'orange');


    $("#temperature_up").click( function () {
      thermostat.upButton();
      color_generator();
      $("#temperature").text( thermostat.getCurrentTemperature());
    });

    $("#temperature_down").click( function () {
      thermostat.downButton();
      color_generator();
      $("#temperature").text( thermostat.getCurrentTemperature());
    });

    $("#power_saving_status").text( thermostat.isPowerSavingOn());

    $("#power_saving_switch").click( function () {
      thermostat.powerSavingSwitch();
        $("#power_saving_status").text( thermostat.isPowerSavingOn());
    });

    $("#temperature_reset").click( function () {
      thermostat.resetButton();
      $("#temperature").text( thermostat.getCurrentTemperature());
    });

    color_generator = function () {
      if (thermostat.displayColour() == 'low-usage') {
        $("#temperature").css('color', 'green');
      }

      if (thermostat.displayColour() == 'medium-usage') {
        $("#temperature").css('color', 'orange');
      }

      if (thermostat.displayColour() == 'high-usage') {
        $("#temperature").css('color', 'red');
      }
    };




  });

};
{'fraction_non_alphanumeric': 0.19696969696969696, 'fraction_numerical': 0.0, 'mean_word_length': 3.5190114068441063, 'pattern_counts': {'":': 0, '<': 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': '5851591', 'n_tokens_mistral': 710, 'n_tokens_neox': 672, 'n_words': 93}