<commit_before>MagnifyingGlass = {
    PluginError: function(params) {
        var e = function() {
            this.name = params.name;
            this.message = params.message;
            this.params = params.params;
        };
        e.prototype = new Error();
        e.prototype.constructor = e;
        return e;
    },
    MagnifyingGlass: function(options) {
        var content = document.getElementById("magnify-enabled");
        var glass_diameter = 200;
        var power = 2;
        var magnifyButton = false;
        var target, targetRect;
        var opaque = false;
        //var lightbox = false;  //TODO 1: scroll down for details..

        if (options) {
            content = options.target ? options.target : content;
            glass_diameter = options.glass_diameter ? options.glass_diameter : glass_diameter;
            power = options.power ? options.power : power;
            magnifyButton = options.toggle_button ? options.toggle_button : false;
            opaque = options.opaque ? true : false;
            //lightbox = options.lightbox? options.lightbox: false; //TODO 1: scroll down for details..
        }

        if (!content)
            throw new PluginError({
                name: "Constructor Error",
                message: "Magnification Target not found. See plugin documentation for more info on this.",
                params: options
            });





        target = content;
        targetRect = target.getBoundingClientRect();
        content = content.cloneNode(true);
        content.id = "zoomed";

        /*TODO 1: iframe lightbox didnt solve the currentXY vs zoomedXY problem..
         * this code left here as lightbox can be a nice added feature..
         * BUT use div lightbox instead of iframe for lightbox as a feature..
         if(lightbox){
         var glassBox = document.createElement("iframe");
         glassBox.id="glass_box";
         
         glassBox.setAttribute("scrolling","no");
         glassBox.setAttribute("frameborder",0);
         
         glassBox.setAttribute("style","position:absolute;padding:0px;overflow:hidden;top:"+Number(targetRect.top)+"px;left:"+Number(targetRect.left)+"px;width:"+(Number(targetRect.width)+50)+"px;height:"+(Number(targetRect.height)+50)+"px;");
         
         lightbox.appendChild(glassBox);
         var _glassBox = document.getElementById("glass_box").contentWindow.document;
         _glassBox.open();
         _glassBox.write("<div id='container'></div>");
         _glassBox.close();
         var lightboxContent = content.cloneNode(true);
         lightboxContent.setAttribute("style",lightboxContent.getAttribute("style")+"margin:0px;top:0px;right:0px;bottom:0px;left:0px;");
         _glassBox.getElementById("container").appendChild(lightboxContent);
         target.innerHTML ="";
         target = _glassBox.getElementById("zoomed");
         }:TODO*/

        var contentWidth = targetRect.width;
        var contentHeight = targetRect.height;
        var contentX = 0;
        var contentY = 0;
        contentX = targetRect.left;
        contentY = targetRect.top;
        if (content.style.position === "absolute") {
            contentX = targetRect.left;
            contentY = targetRect.top;
        }



        var glass = document.createElement("div");
        glass.setAttribute("id", "glass");
        var style = "width:" + glass_diameter + "px;" +
                "height:" + glass_diameter + "px;" +
                "border:#cccccc solid thick;" +
                "overflow:hidden;" +
                "border-radius:" + (glass_diameter / 2) + "px;" +
                "box-shadow:0px 0px 6px 2px #000000;" +
                "position:absolute;";
        glass.setAttribute("style", style);


        var zoomStyle = "-webkit-transform-origin:-" + contentWidth / 2 + "px -" + contentHeight / 2 + "px;" +
                "-webkit-transform:scale(" + power + "," + power + ");position:absolute;";


        var contentStyle = content.getAttribute("style");
        contentStyle = contentStyle ? contentStyle : "";<commit_msg>Ready for Alpha Release !!; :D<commit_after>MagnifyingGlass = {
    PluginError: function(params) {
        var e = function() {
            this.name = params.name;
            this.message = params.message;
            this.params = params.params;
        };
        e.prototype = new Error();
        e.prototype.constructor = e;
        return e;
    },
    MagnifyingGlass: function(options) {
        var content = document.getElementById("magnify-enabled");
        var glass_diameter = 200;
        var power = 2;
        var magnifyButton = false;
        var target, targetRect;
        var opaque = false;
        //var lightbox = false;  //TODO 1: scroll down for details..

        if (options) {
            content = options.target ? options.target : content;
            glass_diameter = options.glass_diameter ? options.glass_diameter : glass_diameter;
            power = options.power ? options.power : power;
            magnifyButton = options.toggle_button ? options.toggle_button : false;
            opaque = options.opaque ? true : false;
            //lightbox = options.lightbox? options.lightbox: false; //TODO 1: scroll down for details..
        }

        if (!content)
            throw new PluginError({
                name: "Constructor Error",
                message: "Magnification Target not found. See plugin documentation for more info on this.",
                params: options
            });





        target = content;
        targetRect = target.getBoundingClientRect();
        content = content.cloneNode(true);
        content.id = "zoomed";

        /*TODO 1: iframe lightbox didnt solve the currentXY vs zoomedXY problem..
         * this code left here as lightbox can be a nice added feature..
         * BUT use div lightbox instead of iframe for lightbox as a feature..
         if(lightbox){
         var glassBox = document.createElement("iframe");
         glassBox.id="glass_box";
         
         glassBox.setAttribute("scrolling","no");
         glassBox.setAttribute("frameborder",0);
         
         glassBox.setAttribute("style","position:absolute;padding:0px;overflow:hidden;top:"+Number(targetRect.top)+"px;left:"+Number(targetRect.left)+"px;width:"+(Number(targetRect.width)+50)+"px;height:"+(Number(targetRect.height)+50)+"px;");
         
         lightbox.appendChild(glassBox);
         var _glassBox = document.getElementById("glass_box").contentWindow.document;
         _glassBox.open();
         _glassBox.write("<div id='container'></div>");
         _glassBox.close();
         var lightboxContent = content.cloneNode(true);
         lightboxContent.setAttribute("style",lightboxContent.getAttribute("style")+"margin:0px;top:0px;right:0px;bottom:0px;left:0px;");
         _glassBox.getElementById("container").appendChild(lightboxContent);
         target.innerHTML ="";
         target = _glassBox.getElementById("zoomed");
         }:TODO*/

        var contentWidth = targetRect.width;
        var contentHeight = targetRect.height;
        var contentX = 0;
        var contentY = 0;
        contentX = targetRect.left;
        contentY = targetRect.top;
        if (content.style.position === "absolute") {
            contentX = targetRect.left;
            contentY = targetRect.top;
        }



        var glass = document.createElement("div");
        glass.setAttribute("id", "glass");
        var style = "width:" + glass_diameter + "px;" +
                "height:" + glass_diameter + "px;" +
                "border:#cccccc solid thick;" +
                "overflow:hidden;" +
                "border-radius:" + (glass_diameter / 2) + "px;" +
                "box-shadow:0px 0px 6px 2px #000000;" +
                "position:absolute;";
        glass.setAttribute("style", style);

        var zoomStyle = "-webkit-transform-origin:-" + contentWidth / 2 + "px -" + contentHeight / 2 + "px;" +
                "-webkit-transform:scale(" + power + "," + power + ");";
        zoomStyle = zoomStyle + "transform-origin:-" + contentWidth / 2 + "px -" + contentHeight / 2 + "px;" +
                "transform:scale(" + power + "," + power + ");position:absolute;";


        var contentStyle = content.getAttribute("style");
        contentStyle = contentStyle ? contentStyle : "";
{'fraction_non_alphanumeric': 0.1258373205741627, 'fraction_numerical': 0.008133971291866028, 'mean_word_length': 2.2482517482517483, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '1784091', 'n_tokens_mistral': 2326, 'n_tokens_neox': 2201, 'n_words': 500}