<commit_before>controller = new BasicController({
    supports: {
        playpause: true,
        next: true,
        previous: true
    },
    playPauseSelector: '#ac_play',
    previousSelector: '.prev.ctrl',
    nextSelector: '.next.ctrl',
    titleSelector: '#ac_title',
    artistSelector: '#ac_performer',
    playStateSelector: '#ac_play',
    playStateClass: 'playing'
});<commit_msg>Update the VK controller for the new design (#112)<commit_after>controller = new BasicController({
    supports: {
        playpause: true,
        next: true,
        previous: true
    },
    playPauseSelector: '.top_audio_player_play',
    previousSelector: '.top_audio_player_prev',
    nextSelector: '.top_audio_player_next',
    titleSelector: '.audio_page_player_title_song',
    artistSelector: '.audio_page_player_title_performer',
    playStateSelector: '#top_audio_player',
    playStateClass: 'top_audio_player_playing'
})

var artistTitleSelector = '.top_audio_player_title'
var artistTitleRegex = /(.*) – (.*)/

controller.override('getTitle', function(_super) {
    var title = _super()
    if (title) {
        var prefix = ' – '
        if (title.startsWith(prefix))
            title = title.substr(prefix.length)
    } else {
        var artistTitle = this.querySelectorText(artistTitleSelector)
        var match = artistTitleRegex.exec(artistTitle)
        if (match)
            title = match[1]
    }
    return title
})

controller.override('getArtist', function(_super) {
    var artist = _super()
    if (!artist) {
        var artistTitle = this.querySelectorText(artistTitleSelector)
        var match = artistTitleRegex.exec(artistTitle)
        if (match)
            artist = match[2]
    }
    return artist
})

{'fraction_non_alphanumeric': 0.11463133640552996, 'fraction_numerical': 0.002880184331797235, 'mean_word_length': 3.0966981132075473, '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': '3080453', 'n_tokens_mistral': 518, 'n_tokens_neox': 516, 'n_words': 108}