<commit_before>// Enables drawing to a canvas
function enableCanvas() {
    // Only run if we have a page canvas!
    if ($(".pageCanvas").length) {
        $(".pageCanvas").each(function() {
            var canvas = $(this)[0];
            var ctx = canvas.getContext("2d");
            var img = new Image();
            img.onload = function() {
                ctx.drawImage(this, 0, 0);
                if (typeof highlight_words !== "undefined") {
                    ctx.lineWidth = "1";
                    ctx.fillStyle = "rgba(225,225,0,0.5)";
                    ctx.strokeStyle = "rgba(0,0,0,0)";
                    
                    jQuery.each(highlight_words, function(k1, v1) {
                        jQuery.each(v1, function(k2, v2) {
                            var x0 = parseInt(this["x0"]);
                            var x1 = parseInt(this["x1"]);

                            var y0 = parseInt(this["y0"]);
                            var y1 = parseInt(this["y1"]);
                            ctx.beginPath();
                            ctx.fillRect(x0, y0, x1 - x0, y1 - y0);
                            ctx.stroke();
                        });
                    });
                }

                if (typeof article_bounding_box !== "undefined") {
                    ctx.lineWidth = "2";
                    ctx.fillStyle = "rgba(0,0,0,0)";
                    ctx.strokeStyle = "rgba(255,0,0,1)";

                    var x0 = parseInt(article_bounding_box["x0"]);
                    var x1 = parseInt(article_bounding_box["x1"]);

                    var y0 = parseInt(article_bounding_box["y0"]);
                    var y1 = parseInt(article_bounding_box["y1"]);<commit_msg>Adjusting style of highlighting<commit_after>// Global variables
var word_highlight_colour = "rgba(225,225,0,0.2)"; // Word highlight colour
var article_bounding_box_colour = "rgba(104,152,204,1)"; // Article bounding box colour

// Enables drawing to a canvas
function enableCanvas() {
    // Only run if we have a page canvas!
    if ($(".pageCanvas").length) {
        $(".pageCanvas").each(function() {
            var canvas = $(this)[0];
            var ctx = canvas.getContext("2d");
            var img = new Image();
            img.onload = function() {
                ctx.drawImage(this, 0, 0);
                if (typeof highlight_words !== "undefined") {
                    ctx.lineWidth = "1";
                    ctx.fillStyle = word_highlight_colour;
                    ctx.strokeStyle = "rgba(0,0,0,0)";
                    
                    jQuery.each(highlight_words, function(k1, v1) {
                        jQuery.each(v1, function(k2, v2) {
                            var x0 = parseInt(this["x0"]);
                            var x1 = parseInt(this["x1"]);

                            var y0 = parseInt(this["y0"]);
                            var y1 = parseInt(this["y1"]);
                            ctx.beginPath();
                            ctx.fillRect(x0, y0, x1 - x0, y1 - y0);
                            ctx.stroke();
                        });
                    });
                }

                if (typeof article_bounding_box !== "undefined") {
                    ctx.lineWidth = "2";
                    ctx.fillStyle = "rgba(0,0,0,0)";
                    ctx.strokeStyle = article_bounding_box_colour;

                    var x0 = parseInt(article_bounding_box["x0"]);
                    var x1 = parseInt(article_bounding_box["x1"]);

                    var y0 = parseInt(article_bounding_box["y0"]);
                    var y1 = parseInt(article_bounding_box["y1"]);
{'fraction_non_alphanumeric': 0.12873185428649686, 'fraction_numerical': 0.03177211722815667, 'mean_word_length': 1.2753894080996884, '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': '1728692', 'n_tokens_mistral': 1059, 'n_tokens_neox': 1000, 'n_words': 201}