<commit_before>"use strict";

var app = {};

app.del = function ( /*keys*/ ) {
    for ( var i = 0; i < arguments.length; i++ ) {
        delete localStorage[arguments[i]];
    }
};

app.get = function ( key ) {
    return  localStorage.hasOwnProperty(key) ?
        JSON.parse(localStorage[ key ]) :
        undefined;
};

app.set = function ( key, val ) {
    localStorage[ key ] = JSON.stringify(val);
};

app.sendNotification = function () {
    //close all previous opened windows
    var notificationWindows = chrome.extension.getViews({
        type: 'notification'
    });
    notificationWindows.forEach(function ( window ) {
        window.close();
    });
    var n = webkitNotifications.createHTMLNotification("notification.html");
//    setTimeout(function () {
//        n.cancel();
//    }, 8000);
    n.show();
};

app.clearBadge = function () {
    app.setBadge("");
};

app.setBadge = function ( text ) {
    text += "";
    text = text === "0" ? "" : text;
    chrome.browserAction.setBadgeText({
        text: text
    })
};

app.playSound = function ( path ) {
    new Audio(path).play();
};

app.init = function () {
    app.clearBadge();
};

var defaultSettings = [
    {
        id    : "viewSort",
        desc  : "Sort streams by",
        type  : "select",<commit_msg>clean up<commit_after>"use strict";

var app = {};

app.del = function ( /*keys*/ ) {
    for ( var i = 0; i < arguments.length; i++ ) {
        delete localStorage[arguments[i]];
    }
};

app.get = function ( key ) {
    return  localStorage.hasOwnProperty(key) ?
        JSON.parse(localStorage[ key ]) :
        undefined;
};

app.set = function ( key, val ) {
    localStorage[ key ] = JSON.stringify(val);
};

app.sendNotification = function () {
    //close all previous opened windows
    var notificationWindows = chrome.extension.getViews({
        type: 'notification'
    });
    notificationWindows.forEach(function ( window ) {
        window.close();
    });
    var n = webkitNotifications.createHTMLNotification("notification.html");
    setTimeout(function () {
        n.cancel();
    }, 8000);
    n.show();
};

app.clearBadge = function () {
    app.setBadge("");
};

app.setBadge = function ( text ) {
    text += "";
    text = text === "0" ? "" : text;
    chrome.browserAction.setBadgeText({
        text: text
    })
};

app.playSound = function ( path ) {
    new Audio(path).play();
};

app.init = function () {
    app.clearBadge();
};

var defaultSettings = [
    {
        id    : "viewSort",
        desc  : "Sort streams by",
        type  : "select",
{'fraction_non_alphanumeric': 0.16362931368747577, 'fraction_numerical': 0.0046529662659945716, 'mean_word_length': 2.477088948787062, 'pattern_counts': {'":': 0, '<': 5, '<?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': '7004088', 'n_tokens_mistral': 813, 'n_tokens_neox': 802, 'n_words': 170}