<commit_before>// GET all divs in page body + total no.
var itemsall = document.body.getElementsByTagName('*');
var il = itemsall.length;


// Array for colour scheme
var color_set = {
		div: "red",
		ul: "blue",
		a: "yellow",
		p: "green"
}

var addcolor = color_set.y;

// Init function to apply coloured borders.
var setstyle = function(y) {
	var addcolor = color_set.y;
	y.style.border = '1px solid ' + addcolor;
};

// Loop through elements and call function.
for (i = 1; i < il; i++) {
	els = itemsall[i];
	setstyle(els);
}







//Switch off how?
var removestyle = function(y) {
	y.removeAttribute("style");
};
for (i = 1; i < il; i++) {
	els = itemsall[i];
	removestyle(els);
}







if (document.querySelectorAll) {
    var allDivs = document.querySelectorAll("div");
    var allLists = document.querySelectorAll("li");
    var allLinks = document.querySelectorAll("a");
    var allHeaderOnes = document.querySelectorAll("h1");
	var
	}
else {
	console.log("None Found");
	}<commit_msg>Revert fix<commit_after>// GET all divs in page body + total no.
var itemsall = document.body.getElementsByTagName('*');
var il = itemsall.length;
var oldborder;

// Containing function
var highlighter = function(context) {

// Loop to cycle through each DOM element and apply an outline according to display type.
for (var i=0; i < il; i++) {
  var els = (itemsall[i]);
  dispstyle = window.getComputedStyle(els),
  disp = dispstyle.getPropertyValue('display');
    switch(disp) {
        case "block":
            els.style.outline = '1px solid blue';
            break;
        case "list-item":
            els.style.outline = '1px solid darkgrey';
            break;
        case "inline-block":
            els.style.outline = '1px solid cyan';
            break;
        case "inline":
            els.style.outline = '1px solid purple';
            break;
        case "flex":
            els.style.outline = '1px solid green';
            break;
        case "none":
            els.style.outline = '1px dotted black';
            break;
        default:
            els.style.outline = '1px dotted grey';
            break;
    };
}

// Reset function - removes all outline properties. Better way to do this?
window.revert = function() {
  for (var i=0; i < il; i++) {
    var els = (itemsall[i]);
    els.style.removeProperty("outline");
  };
};

};

// Call main function.
highlighter(window);
// Call reset function.
revert(window);

// ----------------------------------------------------------------------

/*
//Array for holding colours instead of switch params???
var display_set = {
    block : "blue",
    'inline-block' : "orange",
    inline : "red",
    flex : "green"
}
//Switch off differently? Fill an array with old border style and the re-populate.
var storeborders = [];
oldborder = dispstyle.getPropertyValue('border');
storeborders.push(oldborder);
var revert = function() {
  for (var i=0; i < il; i++) {
    var els = (itemsall[i]);
    els.style.outline = storeoutlines[i];
  };
};
//Different approach to getting all DOM elements initially.
if (document.querySelectorAll) {
    var allDivs = document.querySelectorAll("div");
}
*/
{'fraction_non_alphanumeric': 0.15881050300537805, 'fraction_numerical': 0.004428978171464726, 'mean_word_length': 2.5568053993250843, 'pattern_counts': {'":': 6, '<': 8, '<?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': '2037956', 'n_tokens_mistral': 1009, 'n_tokens_neox': 985, 'n_words': 291}