<commit_before>'use strict';
/* globals $, app, socket */

define('admin/plugins/moonlight', ['settings'], function (Settings) {

  var ACP = {};


  // var events = {
  //   'ticket:user_status_change': onUserStatusChange,
  // };

  // Events.init = function () {
  //   Events.removeListeners();
  //   for (var eventName in events) {
  //     if (events.hasOwnProperty(eventName)) {
  //       socket.on(eventName, events[eventName]);
  //     }
  //   }
  // };

  // Events.removeListeners = function () {
  //   for (var eventName in events) {
  //     if (events.hasOwnProperty(eventName)) {
  //       socket.removeListener(eventName, events[eventName]);
  //     }
  //   }
  // };


  ACP.init = function () {
    Settings.load('moonlight', $('.moonlight-settings'));

    $('#save').on('click', function () {
      Settings.save('moonlight', $('.moonlight-settings'), function () {
        app.alert({
          type: 'success',
          alert_id: 'moonlight-saved',
          title: 'Settings Saved',
          message: 'Success',
          clickfn: () => {
            socket.emit('admin.reload');
          },
        });
      });
    });

    $('#update').on('click', function () {
      socket.emit('plugins.ml.roster.update', {}, function(err) {<commit_msg>Fixed nodebb minification error<commit_after>'use strict';
/* globals $, app, socket */

define('admin/plugins/moonlight', ['settings'], function (Settings) {

  var ACP = {};


  // var events = {
  //   'ticket:user_status_change': onUserStatusChange,
  // };

  // Events.init = function () {
  //   Events.removeListeners();
  //   for (var eventName in events) {
  //     if (events.hasOwnProperty(eventName)) {
  //       socket.on(eventName, events[eventName]);
  //     }
  //   }
  // };

  // Events.removeListeners = function () {
  //   for (var eventName in events) {
  //     if (events.hasOwnProperty(eventName)) {
  //       socket.removeListener(eventName, events[eventName]);
  //     }
  //   }
  // };


  ACP.init = function () {
    Settings.load('moonlight', $('.moonlight-settings'));

    $('#save').on('click', function () {
      Settings.save('moonlight', $('.moonlight-settings'), function () {
        app.alert({
          type: 'success',
          alert_id: 'moonlight-saved',
          title: 'Settings Saved',
          message: 'Success',
          clickfn: function() {
            socket.emit('admin.reload');
          },
        });
      });
    });

    $('#update').on('click', function () {
      socket.emit('plugins.ml.roster.update', {}, function(err) {
{'fraction_non_alphanumeric': 0.19402405898331393, 'fraction_numerical': 0.0, 'mean_word_length': 2.218476903870162, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, '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': '4470146', 'n_tokens_mistral': 804, 'n_tokens_neox': 787, 'n_words': 130}