<commit_before>var Cloudy = {
    isEpisodePage: function() {
        return $("#audioplayer").length == 1;
    },

    getEpisodeDetails: function() {
        if (!Cloudy.isEpisodePage()) {
            return null;
        }
        var episodeTitle = $(".titlestack .title").text();
        var showTitle = $(".titlestack .caption2").text();
        return {
            show_title: showTitle,
            episode_title: episodeTitle
        };
    },

    installPlaybackHandlers: function() {
        var player = $("#audioplayer")[0];
        player.addEventListener("play", Cloudy.playerDidPlay);
        player.addEventListener("pause", Cloudy.playerDidPause);
    },

    playerDidPlay: function() {
        webkit.messageHandlers.playbackHandler.postMessage({
            is_playing: true
        });
    },

    playerDidPause: function() {
        webkit.messageHandlers.playbackHandler.postMessage({
            is_playing: false
        });
    },

    togglePlaybackState: function() {
        var player = $("#audioplayer")[0];
        player.paused ? player.play() : player.pause();
    },<commit_msg>Prevent playback events on non-episode pages.<commit_after>var Cloudy = {
    isEpisodePage: function() {
        return $("#audioplayer").length == 1;
    },

    getEpisodeDetails: function() {
        if (!Cloudy.isEpisodePage()) {
            return null;
        }
        var episodeTitle = $(".titlestack .title").text();
        var showTitle = $(".titlestack .caption2").text();
        return {
            show_title: showTitle,
            episode_title: episodeTitle
        };
    },

    installPlaybackHandlers: function() {
        var player = $("#audioplayer")[0];
        player.addEventListener("play", Cloudy.playerDidPlay);
        player.addEventListener("pause", Cloudy.playerDidPause);
    },

    playerDidPlay: function() {
        webkit.messageHandlers.playbackHandler.postMessage({
            is_playing: true
        });
    },

    playerDidPause: function() {
        webkit.messageHandlers.playbackHandler.postMessage({
            is_playing: false
        });
    },

    togglePlaybackState: function() {
        if (!Cloudy.isEpisodePage()) {
            return;
        }
        var player = $("#audioplayer")[0];
        player.paused ? player.play() : player.pause();
    },
{'fraction_non_alphanumeric': 0.1366167023554604, 'fraction_numerical': 0.003426124197002141, 'mean_word_length': 2.226519337016575, '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': 7, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1252776', 'n_tokens_mistral': 666, 'n_tokens_neox': 639, 'n_words': 114}