<commit_before>(function(Application, Window) {

  /**
   * Main Window
   */
  var ApplicationSettingsWindow = function(app) {
    Window.apply(this, ['ApplicationSettingsWindow', {width: 500, height: 200}, app]);

    this._title                   = "Settings";
    this._icon                    = "/themes/default/icons/16x16/categories/applications-system.png";
    this._properties.allow_resize = false;
  };

  ApplicationSettingsWindow.prototype = Object.create(Window.prototype);

  ApplicationSettingsWindow.prototype.init = function(wm) {
    var self      = this;
    var root      = Window.prototype.init.apply(this, arguments);
    var app       = this._appRef;
    var cs        = OSjs.API.getCoreService();
    var _tmp      = (typeof window.___tmp === 'undefined') ? 0 : (window.___tmp++);
    var settings  = wm.getSettings();

    var container = document.createElement('div');
    var outer, label, input, button, tmp;

    // Background Type
    outer = document.createElement('div');
    outer.className = "Setting SettingsNoButton Setting_BackgroundType";

    label = document.createElement('label');
    label.innerHTML = "Background Type";

    input = document.createElement('select');
    input.name = "backgroundType_" + _tmp;

    tmp = document.createElement('option');
    tmp.value = 'image';
    tmp.innerHTML = 'Image';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'image-repeat';
    tmp.innerHTML = 'Image (Repeat)';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'image-center';
    tmp.innerHTML = 'Image (Center)';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'image-fill';
    tmp.innerHTML = 'Image (Fill)';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'image-strech';
    tmp.innerHTML = 'Image (Strech)';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'color';
    tmp.innerHTML = 'Color';
    input.appendChild(tmp);

    for ( var i = 0; i < input.childNodes.length; i++ ) {
      if ( input.childNodes[i].value == settings.background ) {
        //input.childNodes[i].selected = "selected";
        input.selectedIndex = i;
        break;
      }
    }

    outer.appendChild(label);
    outer.appendChild(input);
    container.appendChild(outer);

    // Background Image
    outer = document.createElement('div');
    outer.className = "Setting Setting_BackgroundImage";

    label = document.createElement('label');
    label.innerHTML = "Background Image";

    input = document.createElement('input');
    input.type = "text";
    input.disabled = "disabled";
    input.name = "backgroundImage_" + _tmp;
    input.value = settings.wallpaper;

    button = document.createElement('button');
    button.innerHTML = "...";

    button = document.createElement('button');
    button.innerHTML = "...";
    button.onclick = (function(inp) {
      return function(ev) {
        self.openBackgroundSelect(ev, inp);
      };
    })(input);

    outer.appendChild(label);
    outer.appendChild(input);
    outer.appendChild(button);
    container.appendChild(outer);

    // Background Color
    outer = document.createElement('div');
    outer.className = "Setting Setting_BackgroundColor";

    label = document.createElement('label');
    label.innerHTML = "Background Color";

    input = document.createElement('input');
    input.type = "text";
    input.disabled = "disabled";
    input.name = "backgroundColor_" + _tmp;
    input.style.backgroundColor = settings.style.backgroundColor;
    input.style.color = "#fff";
    input.value = settings.style.backgroundColor;

    button = document.createElement('button');
    button.innerHTML = "...";
    button.onclick = (function(inp) {
      return function(ev) {
        self.openBackgroundSelect(ev, inp);
        self.openBackgroundColorSelect(ev, inp);
      };
    })(input);

    outer.appendChild(label);
    outer.appendChild(input);
    outer.appendChild(button);
    container.appendChild(outer);

    button = document.createElement('button');
    button.className = "Save";
    button.innerHTML = "Apply";
    button.onclick = function(ev) {
      app.save(ev, self, {
        backgroundType: document.getElementsByName('backgroundType_' + _tmp)[0].value,
        backgroundImage: document.getElementsByName('backgroundImage_' + _tmp)[0].value,
        backgroundColor: document.getElementsByName('backgroundColor_' + _tmp)[0].value
      });
    };

    root.appendChild(container);
    root.appendChild(button);
  };
<commit_msg>Settings: Fixed a paste by error<commit_after>(function(Application, Window) {

  /**
   * Main Window
   */
  var ApplicationSettingsWindow = function(app) {
    Window.apply(this, ['ApplicationSettingsWindow', {width: 500, height: 200}, app]);

    this._title                   = "Settings";
    this._icon                    = "/themes/default/icons/16x16/categories/applications-system.png";
    this._properties.allow_resize = false;
  };

  ApplicationSettingsWindow.prototype = Object.create(Window.prototype);

  ApplicationSettingsWindow.prototype.init = function(wm) {
    var self      = this;
    var root      = Window.prototype.init.apply(this, arguments);
    var app       = this._appRef;
    var cs        = OSjs.API.getCoreService();
    var _tmp      = (typeof window.___tmp === 'undefined') ? 0 : (window.___tmp++);
    var settings  = wm.getSettings();

    var container = document.createElement('div');
    var outer, label, input, button, tmp;

    // Background Type
    outer = document.createElement('div');
    outer.className = "Setting SettingsNoButton Setting_BackgroundType";

    label = document.createElement('label');
    label.innerHTML = "Background Type";

    input = document.createElement('select');
    input.name = "backgroundType_" + _tmp;

    tmp = document.createElement('option');
    tmp.value = 'image';
    tmp.innerHTML = 'Image';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'image-repeat';
    tmp.innerHTML = 'Image (Repeat)';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'image-center';
    tmp.innerHTML = 'Image (Center)';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'image-fill';
    tmp.innerHTML = 'Image (Fill)';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'image-strech';
    tmp.innerHTML = 'Image (Strech)';
    input.appendChild(tmp);

    tmp = document.createElement('option');
    tmp.value = 'color';
    tmp.innerHTML = 'Color';
    input.appendChild(tmp);

    for ( var i = 0; i < input.childNodes.length; i++ ) {
      if ( input.childNodes[i].value == settings.background ) {
        //input.childNodes[i].selected = "selected";
        input.selectedIndex = i;
        break;
      }
    }

    outer.appendChild(label);
    outer.appendChild(input);
    container.appendChild(outer);

    // Background Image
    outer = document.createElement('div');
    outer.className = "Setting Setting_BackgroundImage";

    label = document.createElement('label');
    label.innerHTML = "Background Image";

    input = document.createElement('input');
    input.type = "text";
    input.disabled = "disabled";
    input.name = "backgroundImage_" + _tmp;
    input.value = settings.wallpaper;

    button = document.createElement('button');
    button.innerHTML = "...";

    button = document.createElement('button');
    button.innerHTML = "...";
    button.onclick = (function(inp) {
      return function(ev) {
        self.openBackgroundSelect(ev, inp);
      };
    })(input);

    outer.appendChild(label);
    outer.appendChild(input);
    outer.appendChild(button);
    container.appendChild(outer);

    // Background Color
    outer = document.createElement('div');
    outer.className = "Setting Setting_BackgroundColor";

    label = document.createElement('label');
    label.innerHTML = "Background Color";

    input = document.createElement('input');
    input.type = "text";
    input.disabled = "disabled";
    input.name = "backgroundColor_" + _tmp;
    input.style.backgroundColor = settings.style.backgroundColor;
    input.style.color = "#fff";
    input.value = settings.style.backgroundColor;

    button = document.createElement('button');
    button.innerHTML = "...";
    button.onclick = (function(inp) {
      return function(ev) {
        self.openBackgroundColorSelect(ev, inp);
      };
    })(input);

    outer.appendChild(label);
    outer.appendChild(input);
    outer.appendChild(button);
    container.appendChild(outer);

    button = document.createElement('button');
    button.className = "Save";
    button.innerHTML = "Apply";
    button.onclick = function(ev) {
      app.save(ev, self, {
        backgroundType: document.getElementsByName('backgroundType_' + _tmp)[0].value,
        backgroundImage: document.getElementsByName('backgroundImage_' + _tmp)[0].value,
        backgroundColor: document.getElementsByName('backgroundColor_' + _tmp)[0].value
      });
    };

    root.appendChild(container);
    root.appendChild(button);
  };

{'fraction_non_alphanumeric': 0.14339541393045538, 'fraction_numerical': 0.003229626439875121, 'mean_word_length': 3.152883325882879, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5177296', 'n_tokens_mistral': 2629, 'n_tokens_neox': 2539, 'n_words': 487}