<commit_before>module.exports = {
    id: 'switch',
    template: require('./index.html'),
    ready: function () {
        this.$watch('value', function (newVal) {
            var chosenOption = 0 + newVal; // convert Boolean to Number
            chosenOption = this.options[chosenOption];
            this.$dispatch('switchValueChanged', chosenOption);
        });
    },
    data: {
        value: false,
        options: ['Off', 'On']
    },
    methods: {
        onClick: function (event) {
            this.value = !this.value;
        }
    }
};<commit_msg>Fixes #1100: Tapping on Featured/Newest shouldn't be a toggle<commit_after>module.exports = {
    id: 'switch',
    template: require('./index.html'),
    ready: function () {
        this.$watch('value', function (newVal) {
            var chosenOption = 0 + newVal; // convert Boolean to Number
            chosenOption = this.options[chosenOption];
            this.$dispatch('switchValueChanged', chosenOption);
        });
    },
    data: {
        value: false,
        options: ['Off', 'On']
    },
    methods: {
        onClick: function (event) {
            if (this.options[(0 + this.value)] === event.target.textContent) {
                // is the current option the same as the option that was just
                // tapped on? if so, do nothing.
                return false;
            } else {
                this.value = !this.value;
            }
        }
    }
};
{'fraction_non_alphanumeric': 0.1360824742268041, 'fraction_numerical': 0.004810996563573883, 'mean_word_length': 1.789272030651341, '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': '4708132', 'n_tokens_mistral': 404, 'n_tokens_neox': 396, 'n_words': 101}