<commit_before>import * as $ from 'jquery';
import { remote } from 'electron';

class TitleBar {
    constructor() { }

    initializeButtons(): any {
        $('#titlebar-close-button').click(function () {
            remote.getCurrentWindow().close();
            return false;
        });
        $('#titlebar-maximize-button').click(function () {
            remote.getCurrentWindow().isMaximized() ? remote.getCurrentWindow().unmaximize() : remote.getCurrentWindow().maximize();
            return false;
        });
        $('#titlebar-minimize-button').click(function () {
            remote.getCurrentWindow().minimize();
            return false;
        });
        $('.titlebar-buttons').show();
    }

    title(title) {
        $('title').html(title);
        $('.titlebar-title').html(title);
    }

    removeTitle() {
        $('title').html('');
        $('.titlebar-title').html('');
    }

    normal(title = null) {
        if (title) {<commit_msg>fix buttons<commit_after>import * as $ from 'jquery';
import { remote } from 'electron';

class TitleBar {
    isButtonsInitialized = false;
    constructor() { 
    }

    initializeButtons(): any {
        if(this.isButtonsInitialized)
            return;
        this.isButtonsInitialized = true;
        $('#titlebar-close-button').click(function () {
            remote.getCurrentWindow().close();
            return false;
        });
        $('#titlebar-maximize-button').click(function () {
            remote.getCurrentWindow().isMaximized() ? remote.getCurrentWindow().unmaximize() : remote.getCurrentWindow().maximize();
            return false;
        });
        $('#titlebar-minimize-button').click(function () {
            remote.getCurrentWindow().minimize();
            return false;
        });
        $('.titlebar-buttons').show();
    }

    title(title) {
        $('title').html(title);
        $('.titlebar-title').html(title);
    }

    removeTitle() {
        $('title').html('');
        $('.titlebar-title').html('');
    }

    normal(title = null) {
        if (title) {
{'fraction_non_alphanumeric': 0.17686746987951807, 'fraction_numerical': 0.0, 'mean_word_length': 2.2086553323029365, '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': '7220012', 'n_tokens_mistral': 573, 'n_tokens_neox': 581, 'n_words': 83}