<commit_before>﻿define([
    'text!template/voteStreamus.html'
], function (VoteStreamusTemplate) {
    'use strict';
    
    var Settings = chrome.extension.getBackgroundPage().Settings;
    
    var VoteStreamusView = Backbone.Marionette.ItemView.extend({
        className: 'vote-streamus',

        template: _.template(VoteStreamusTemplate),
        
        templateHelpers: {
            dontRemindMeAgainMessage: chrome.i18n.getMessage('dontRemindMeAgain')
        },
        
        events: {
            'click .vote-link': 'openVoteWindow'
        },
        
        ui: {
            reminderCheckbox: '.reminder input[type="checkbox"]'
        },

        doOk: function () {
            var remindVoteStreamus = !this.ui.reminderCheckbox.is(':checked');
            Settings.set('remindVoteStreamus', remindVoteStreamus);
        },
        
        openVoteWindow: function() {
            chrome.windows.create({
                'url': 'http://competition.coshx.com/ideas/streamus-simple-streaming-music'
            });
        }
    });

    return VoteStreamusView;
});<commit_msg>Changed to opening a tab instead of a new window<commit_after>﻿define([
    'text!template/voteStreamus.html'
], function (VoteStreamusTemplate) {
    'use strict';
    
    var Settings = chrome.extension.getBackgroundPage().Settings;
    
    var VoteStreamusView = Backbone.Marionette.ItemView.extend({
        className: 'vote-streamus',

        template: _.template(VoteStreamusTemplate),
        
        templateHelpers: {
            dontRemindMeAgainMessage: chrome.i18n.getMessage('dontRemindMeAgain')
        },
        
        events: {
            'click .vote-link': 'openVoteWindow'
        },
        
        ui: {
            reminderCheckbox: '.reminder input[type="checkbox"]'
        },

        doOk: function () {
            var remindVoteStreamus = !this.ui.reminderCheckbox.is(':checked');
            Settings.set('remindVoteStreamus', remindVoteStreamus);
        },
        
        openVoteWindow: function() {
            chrome.tabs.create({
                'url': 'http://competition.coshx.com/ideas/streamus-simple-streaming-music'
            });
        }
    });

    return VoteStreamusView;
});
{'fraction_non_alphanumeric': 0.12064343163538874, 'fraction_numerical': 0.0017873100983020554, 'mean_word_length': 2.0840220385674932, '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': '4728480', 'n_tokens_mistral': 660, 'n_tokens_neox': 645, 'n_words': 91}