<commit_before>'use strict';

var blocker = require('../blocker.js');

function makeAsocialBlock() {
    /**
     * @constant {HTMLElement} ASOCIAL_BLOCK - substitute for news block.
     */
    var ASOCIAL_BLOCK = document.createElement('div');

    ASOCIAL_BLOCK.classList.add('asocial_block');
    ASOCIAL_BLOCK.textContent = chrome.i18n.getMessage('motivateMessage');

    return ASOCIAL_BLOCK;
}

function replaceNewsBlock() {
    /**
     * @constant {HTMLElement} NEWS_BLOCK - substituted news block.
     */
    var NEWS_BLOCK = document.querySelector('#stream_pagelet');
    var RIGHT_COLUMN = document.querySelector('#rightCol');
    var LEFT_COLUMN = document.querySelector('#leftCol');

    if (NEWS_BLOCK && (window.location.pathname.indexOf('messages') === -1)) {
        var newsParent = NEWS_BLOCK.parentNode;

        newsParent.insertBefore(makeAsocialBlock(), NEWS_BLOCK);
        newsParent.removeChild(NEWS_BLOCK);
    }

    if (RIGHT_COLUMN) {
        RIGHT_COLUMN.parentNode.removeChild(RIGHT_COLUMN);
    }

    if (LEFT_COLUMN) {
        LEFT_COLUMN.parentNode.removeChild(LEFT_COLUMN);
    }
}

function isLoaded() {
    return Boolean(document.querySelector('#stream_pagelet'));
}

blocker.init('facebook', replaceNewsBlock, isLoaded);<commit_msg>Changed container for asocial block<commit_after>'use strict';

var blocker = require('../blocker.js');

function makeAsocialBlock() {
    /**
     * @constant {HTMLElement} ASOCIAL_BLOCK - substitute for news block.
     */
    var ASOCIAL_BLOCK = document.createElement('div');

    ASOCIAL_BLOCK.classList.add('asocial_block');
    ASOCIAL_BLOCK.textContent = chrome.i18n.getMessage('motivateMessage');

    return ASOCIAL_BLOCK;
}

function replaceNewsBlock() {
    /**
     * @constant {HTMLElement} NEWS_BLOCK - substituted news block.
     */
    var NEWS_BLOCK = document.querySelector('#content_container');
    var RIGHT_COLUMN = document.querySelector('#rightCol');
    var LEFT_COLUMN = document.querySelector('#leftCol');

    if (NEWS_BLOCK && (window.location.pathname.indexOf('messages') === -1)) {
        var newsParent = NEWS_BLOCK.parentNode;

        newsParent.insertBefore(makeAsocialBlock(), NEWS_BLOCK);
        newsParent.removeChild(NEWS_BLOCK);
    }

    if (RIGHT_COLUMN) {
        RIGHT_COLUMN.parentNode.removeChild(RIGHT_COLUMN);
    }

    if (LEFT_COLUMN) {
        LEFT_COLUMN.parentNode.removeChild(LEFT_COLUMN);
    }
}

function isLoaded() {
    return Boolean(document.querySelector('#content_container'));
}

blocker.init('facebook', replaceNewsBlock, isLoaded);
{'fraction_non_alphanumeric': 0.1287820015515904, 'fraction_numerical': 0.0023273855702094647, 'mean_word_length': 3.931166347992352, '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': '5374094', 'n_tokens_mistral': 794, 'n_tokens_neox': 795, 'n_words': 127}