<commit_before>;(function() {

    // EXT
    // (obj notation)
    var buildElement = function buildElement (parentConfig) {
        
        var temp = document.createElement(parentConfig[0]);
        if( parentConfig[1] ) temp.setAttribute('class', parentConfig[1]);
        if( parentConfig[2] ) temp.setAttribute('style', parentConfig[2]);

        if ( parentConfig.length > 3 ) {
            var i = 3, l = parentConfig.length;
            for(; i < l; i++) {
                temp.appendChild(buildElement(parentConfig[i]));
            }
        }
        
        return temp;
        
    };

    // Listen for share button clicks

    var share = {};
    $('body').on('click', 'a.share_action_link', function (e) {
        var parent = $(this).closest('.genericStreamStory');
        share.via = $(parent).find('.actorName').text();
        share.text = $(parent).find('.messageBody').text();
        var url = $(parent).find('.uiStreamSource a').attr('href');
        if( url[0] == "/" ) url = "https://facebook.com" + url;
        share.url = url;
        var small_img = $(parent).find('.uiPhotoThumb img').attr('src');
        if( small_img ) {
            var img = small_img.replace(/s[0-9]+x[0-9]+\//, '');
            share.image = img;
            share.url = $(parent).find('.uiPhotoThumb').attr('href');
        }
    });
    
    var config = {};
    config.base = "https://facebook.com";
    config.time = {
        reload: 800
    };
    config.buttons = [
        {
            name: "status",
            text: "Buffer",
            container: 'ul.uiComposerBarRightArea',
            after: '.privacyWidget',
            className: 'buffer-facebook-button',
            selector: '.buffer-facebook-button',
            elements:
                    ['li', 'pls uiListItem uiListHorizontalItemBorder uiListHorizontalItem', '',
                        ['label', '', '',<commit_msg>Fixed: pass original link to buffer box Fixed: reset share object on click<commit_after>;(function() {

    // EXT
    // (obj notation)
    var buildElement = function buildElement (parentConfig) {
        
        var temp = document.createElement(parentConfig[0]);
        if( parentConfig[1] ) temp.setAttribute('class', parentConfig[1]);
        if( parentConfig[2] ) temp.setAttribute('style', parentConfig[2]);

        if ( parentConfig.length > 3 ) {
            var i = 3, l = parentConfig.length;
            for(; i < l; i++) {
                temp.appendChild(buildElement(parentConfig[i]));
            }
        }
        
        return temp;
        
    };

    // Listen for share button clicks
    var share = {};
    $('body').on('click', 'a.share_action_link', function (e) {
        var parent = $(this).closest('.genericStreamStory');

		// reset share object
		share = {};
        share.via = $(parent).find('.actorName').text();
        share.text = $(parent).find('.messageBody').text();

		// find picture status
		var small_img = $(parent).find('.uiPhotoThumb img').attr('src');
		var url = $(parent).find('.uiAttachmentTitle a').attr('href');
       
        if( small_img ) {
            var img = small_img.replace(/s[0-9]+x[0-9]+\//, '');
            share.image = img;
            //share.url = $(parent).find('.uiPhotoThumb').attr('href');
        } 

		// find link status
		else if (url) {
			if( url[0] == "/" ) url = "https://facebook.com" + url;
	        share.url = url;
		}
    });
    
    var config = {};
    config.base = "https://facebook.com";
    config.time = {
        reload: 800
    };
    config.buttons = [
        {
            name: "status",
            text: "Buffer",
            container: 'ul.uiComposerBarRightArea',
            after: '.privacyWidget',
            className: 'buffer-facebook-button',
            selector: '.buffer-facebook-button',
            elements:
                    ['li', 'pls uiListItem uiListHorizontalItemBorder uiListHorizontalItem', '',
                        ['label', '', '',
{'fraction_non_alphanumeric': 0.16574585635359115, 'fraction_numerical': 0.007533902561526871, 'mean_word_length': 1.9243759177679882, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 4, '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': '3068625', 'n_tokens_mistral': 1163, 'n_tokens_neox': 1123, 'n_words': 233}