<commit_before>import * as settingsPage from './settingsPage';
import * as system from '../support/system';

export function prefs() {
  // Guild Manage
  return '<tr><th colspan="2"><b>Guild>Manage preferences' +
      '</b></th></tr>' +
    '<tr><td colspan="2">Enter guild names, ' +
      'separated by commas</td></tr>' +
    '<tr><td class="fshRight">Own Guild</td><td>' +
      settingsPage.injectSettingsGuildData('Self') + '</td></tr>' +
    '<tr><td class="fshRight">Friendly Guilds</td><td>' +
      settingsPage.injectSettingsGuildData('Frnd') + '</td></tr>' +
    '<tr><td class="fshRight">Old Guilds</td><td>' +
      settingsPage.injectSettingsGuildData('Past') + '</td></tr>' +
    '<tr><td class="fshRight">Enemy Guilds</td><td>' +
      settingsPage.injectSettingsGuildData('Enmy') + '</td></tr>' +

    '<tr><td class="fshRight">Highlight Valid PvP Targets' +
      settingsPage.helpLink('Highlight Valid PvP Targets',
      'Enabling this option will highlight targets in OTHER guilds that ' +
      'are within your level range to attack for PvP or GvG.') +
      ':</td><td>PvP: <input name="highlightPlayersNearMyLvl" ' +
      'type="checkbox" value="on"' +
      (system.getValue('highlightPlayersNearMyLvl') ? ' checked' : '') +
      '> GvG: <input name="highlightGvGPlayersNearMyLvl" ' +
      'type="checkbox" value="on"' +
      (system.getValue('highlightGvGPlayersNearMyLvl') ?
      ' checked' : '') + '></td></tr>' +
<commit_msg>refactoring<commit_after>import * as settingsPage from './settingsPage';
import * as system from '../support/system';

function injectSettingsGuildData(guildType) { // Native
  return '<input name="guild' + guildType + '" size="60" value="' +
    system.getValue('guild' + guildType) + '">' +
    '<span class="fshPoint" ' +
    'id="toggleShowGuild' + guildType + 'Message" linkto="showGuild' +
    guildType + 'Message"> &#x00bb;</span>' +
    '<div id="showGuild' + guildType + 'Message" class="fshHide">' +
    '<input name="guild' + guildType + 'Message" size="60" value="' +
    system.getValue('guild' + guildType + 'Message') + '">' +
    '</div>';
}

export function prefs() {
  // Guild Manage
  return '<tr><th colspan="2"><b>Guild>Manage preferences' +
      '</b></th></tr>' +
    '<tr><td colspan="2">Enter guild names, ' +
      'separated by commas</td></tr>' +
    '<tr><td class="fshRight">Own Guild</td><td>' +
      injectSettingsGuildData('Self') + '</td></tr>' +
    '<tr><td class="fshRight">Friendly Guilds</td><td>' +
      injectSettingsGuildData('Frnd') + '</td></tr>' +
    '<tr><td class="fshRight">Old Guilds</td><td>' +
      injectSettingsGuildData('Past') + '</td></tr>' +
    '<tr><td class="fshRight">Enemy Guilds</td><td>' +
      injectSettingsGuildData('Enmy') + '</td></tr>' +

    '<tr><td class="fshRight">Highlight Valid PvP Targets' +
      settingsPage.helpLink('Highlight Valid PvP Targets',
      'Enabling this option will highlight targets in OTHER guilds that ' +
      'are within your level range to attack for PvP or GvG.') +
      ':</td><td>PvP: <input name="highlightPlayersNearMyLvl" ' +
      'type="checkbox" value="on"' +
      (system.getValue('highlightPlayersNearMyLvl') ? ' checked' : '') +
      '> GvG: <input name="highlightGvGPlayersNearMyLvl" ' +
      'type="checkbox" value="on"' +
      (system.getValue('highlightGvGPlayersNearMyLvl') ?
      ' checked' : '') + '></td></tr>' +

{'fraction_non_alphanumeric': 0.20246117784939935, 'fraction_numerical': 0.002929973630237328, 'mean_word_length': 3.9051724137931036, 'pattern_counts': {'":': 0, '<': 93, '<?xml version=': 0, '>': 95, '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': '900747', 'n_tokens_mistral': 1190, 'n_tokens_neox': 1142, 'n_words': 219}