<commit_before>'use strict';


var RecentFollower = nodecg.Replicant('RecentFollower');

nodecg.listenFor('channel-followed', 'nodecg-beam-service', function(user) {
    RecentFollower.value = user.username;
});

var alertBox = document.getElementById('alert');
alertBox.addEventListener('webkitAnimationEnd', function(){
    this.style.webkitAnimationName = '';
}, false);

RecentFollower.on('change', function(newvalue, oldvalue) {
    alertBox.classList.remove('recentFollowerAnimDownClass');
    document.getElementById("RecentFollower").firstElementChild.textContent = newvalue;
    setTimeout( () => { alertBox.classList.add('recentFollowerAnimDownClass') }, 50);
});<commit_msg>Added Twitch follower event hook<commit_after>'use strict';


var RecentFollower = nodecg.Replicant('RecentFollower');

nodecg.listenFor('channel-followed', 'nodecg-beam-service', function(user) {
    RecentFollower.value = user.username;
});

nodecg.listenFor('channel-followed', 'nodecg-twitch-service', function(user) {
    RecentFollower.value = user.display_name;
});


var alertBox = document.getElementById('alert');
alertBox.addEventListener('webkitAnimationEnd', function(){
    this.style.webkitAnimationName = '';
}, false);

RecentFollower.on('change', function(newvalue, oldvalue) {
    alertBox.classList.remove('recentFollowerAnimDownClass');
    document.getElementById("RecentFollower").firstElementChild.textContent = newvalue;
    setTimeout( () => { alertBox.classList.add('recentFollowerAnimDownClass') }, 50);
});
{'fraction_non_alphanumeric': 0.1493421052631579, 'fraction_numerical': 0.002631578947368421, 'mean_word_length': 6.880829015544041, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '2709932', 'n_tokens_mistral': 467, 'n_tokens_neox': 432, 'n_words': 61}