<commit_before>var desktop_notifications_panel = (function () {

var exports = {};

var resize_app = function () {
    var panels_height = $("#panels").height();
    $("body > .app").height("calc(100% - " + panels_height + "px)");
    // the floating recipient bar is usually positioned 10px below the
    // header, so add that to the panels height to get the new `top` value.
    $("#floating_recipient_bar").css("top", panels_height + $(".header").height() + 10 + "px");
};

exports.resize_app = resize_app;

var show_step = function (step) {
    $("#panels [data-step]").hide().filter("[data-step=" + step + "]").show();
};

var get_step = function () {
    return $("#panels [data-step]").filter(":visible").data("step");
};

exports.initialize = function () {
    var ls = localstorage();

    var should_show_notifications = (
        // if the user said to never show banner on this computer again, it will
        // be stored as `true` so we want to negate that.
        !ls.get("dontAskForNotifications") &&
        // if permission has not been granted yet.
        !notifications.granted_desktop_notifications_permission() &&
        // if permission is allowed to be requested (e.g. not in "denied" state).
        notifications.permission_state() !== "denied"
    );

    if (should_show_notifications) {
        $("#desktop-notifications-panel").show();
        resize_app();
    }

    $(".request-desktop-notifications").on("click", function (e) {
        e.preventDefault();
        $(this).closest(".alert").hide();
        notifications.request_desktop_notifications_permission();
        resize_app();
    });

    $(".reject-notifications").on("click", function () {
        $(this).closest(".alert").hide();<commit_msg>notification-banner: Check if mobile before displaying.<commit_after>var desktop_notifications_panel = (function () {

var exports = {};

var resize_app = function () {
    var panels_height = $("#panels").height();
    $("body > .app").height("calc(100% - " + panels_height + "px)");
    // the floating recipient bar is usually positioned 10px below the
    // header, so add that to the panels height to get the new `top` value.
    $("#floating_recipient_bar").css("top", panels_height + $(".header").height() + 10 + "px");
};

exports.resize_app = resize_app;

var show_step = function (step) {
    $("#panels [data-step]").hide().filter("[data-step=" + step + "]").show();
};

var get_step = function () {
    return $("#panels [data-step]").filter(":visible").data("step");
};

exports.initialize = function () {
    var ls = localstorage();

    var should_show_notifications = (
        // notifications *basically* don't work on any mobile platforms, so don't
        // event show the banners. This prevents trying to access things that
        // don't exist like `Notification.permission`.
        !util.is_mobile() &&
        // if the user said to never show banner on this computer again, it will
        // be stored as `true` so we want to negate that.
        !ls.get("dontAskForNotifications") &&
        // if permission has not been granted yet.
        !notifications.granted_desktop_notifications_permission() &&
        // if permission is allowed to be requested (e.g. not in "denied" state).
        notifications.permission_state() !== "denied"
    );

    if (should_show_notifications) {
        $("#desktop-notifications-panel").show();
        resize_app();
    }

    $(".request-desktop-notifications").on("click", function (e) {
        e.preventDefault();
        $(this).closest(".alert").hide();
        notifications.request_desktop_notifications_permission();
        resize_app();
    });

    $(".reject-notifications").on("click", function () {
        $(this).closest(".alert").hide();
{'fraction_non_alphanumeric': 0.1633085896076352, 'fraction_numerical': 0.003711558854718982, 'mean_word_length': 3.146153846153846, 'pattern_counts': {'":': 2, '<': 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': '4139887', 'n_tokens_mistral': 1110, 'n_tokens_neox': 1070, 'n_words': 286}