{"size": 8094, "ext": "js", "max_stars_repo_path": "dist/jquery.xrayglasses.min.js", "max_stars_repo_name": "insanityfarm/jquery-xrayglasses", "max_stars_repo_stars_event_min_datetime": "2019-04-19T12:44:47.000Z", "max_stars_repo_stars_event_max_datetime": "2019-04-19T12:44:47.000Z", "max_issues_repo_path": "dist/jquery.xrayglasses.min.js", "max_issues_repo_name": "insanityfarm/jquery-xrayglasses", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "dist/jquery.xrayglasses.min.js", "max_forks_repo_name": "insanityfarm/jquery-xrayglasses", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 8094.0, "max_line_length": 8094, "alphanum_fraction": 0.8907832963}
!function(a,s){var e=function(a,e){xrayglasses=this,xrayglasses.elem=a,xrayglasses.$elem=s(a),xrayglasses.options=e};e.prototype={defaults:{overlayOpacity:.8,toggleKeyCode:88,lens:"binoculars",scale:1},init:function(){return xrayglasses.config=s.extend({},xrayglasses.defaults,xrayglasses.options),xrayglasses.data={page:s(document),viewport:s(a),body:s("body"),pageWrapper:xrayglasses.$elem,lensImage:"",lensWidth:0,lensHeight:0},xrayglasses.attach(),xrayglasses.data.viewport.on("scroll",xrayglasses.updateFixedPositions).on("resize",xrayglasses.update).on("mousemove",xrayglasses.move).on("keyup keydown",xrayglasses.keypress),xrayglasses},attach:function(){var a=function(){xrayglasses.data.lensWidth=this.width*xrayglasses.config.scale,xrayglasses.data.lensHeight=this.height*xrayglasses.config.scale;var a=s('<svg id="xrayglasses" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><defs><mask id="mask" maskUnits="userSpaceOnUse" maskContentUnits="userSpaceOnUse"><image width="'+xrayglasses.data.lensWidth+'px" height="'+xrayglasses.data.lensHeight+'px" xlink:href="'+xrayglasses.data.lensImage+'"></image></mask></defs><rect id="xrayglassesOverlay" width="100%" height="100%" /><foreignObject width="100%" height="100%" style="mask: url(#mask);"><div class="wrapper"></div></foreignObject></svg>');xrayglasses.data.pageWrapper.after(a),xrayglasses.data.xrayglasses=s("#xrayglasses"),xrayglasses.data.overlay=s("#xrayglassesOverlay"),xrayglasses.data.embeddedMaskLens=s("#mask image"),xrayglasses.data.xrayglassesContent=s("#xrayglasses .wrapper"),xrayglasses.data.xrayglassesContent.css({"-webkit-mask-image":"url('"+xrayglasses.data.lensImage+"')","-webkit-mask-size":xrayglasses.data.lensWidth+"px "+xrayglasses.data.lensHeight+"px"}),xrayglasses.data.overlay.css({fill:"rgba(0,0,0,"+xrayglasses.config.overlayOpacity+")"}),xrayglasses.update()};s("<img/>",{src:xrayglasses.data.lensImage=xrayglasses.getLensImage(),load:a})},update:function(){xrayglasses.data.xrayglassesContent.html(xrayglasses.data.pageWrapper.html()),xrayglasses.data.pageWidth=xrayglasses.data.viewport.width(),xrayglasses.data.pageHeight=xrayglasses.data.page.height()>xrayglasses.data.viewport.height()?xrayglasses.data.page.height():xrayglasses.data.viewport.height(),xrayglasses.data.xrayglasses.attr({width:xrayglasses.data.pageWidth,height:xrayglasses.data.pageHeight}),xrayglasses.data.overlay.attr({width:xrayglasses.data.pageWidth,height:xrayglasses.data.pageHeight}),xrayglasses.data.xrayglassesContent.css({height:xrayglasses.data.pageHeight,paddingLeft:xrayglasses.data.body.css("marginLeft"),paddingRight:xrayglasses.data.body.css("marginRight")}),xrayglasses.updateFixedPositions()},move:function(a){xrayglasses.data.xrayglassesContent.css({"-webkit-mask-position-x":a.pageX-xrayglasses.data.lensWidth/2,"-webkit-mask-position-y":a.pageY-xrayglasses.data.lensHeight/2}),xrayglasses.data.embeddedMaskLens.attr({x:a.pageX-xrayglasses.data.lensWidth/2,y:a.pageY-xrayglasses.data.lensHeight/2})},updateFixedPositions:function(){var a=xrayglasses.data.viewport.scrollTop(),e=xrayglasses.data.viewport.scrollLeft();xrayglasses.data.xrayglasses.find(".fixed").each(function(){s(this).css({marginTop:"auto"==s(this).css("top")?"auto":a,marginLeft:"auto"==s(this).css("left")?"auto":e})})},keypress:function(a){if((a.keyCode||a.which)==xrayglasses.config.toggleKeyCode){var s="keydown"===a.type,e=xrayglasses.data.xrayglasses.css("opacity")<.5;s===e&&xrayglasses.data.xrayglasses.fadeTo(100,e?1:0)}},getLensImage:function(){return predefinedLenses.hasOwnProperty(xrayglasses.config.lens)?predefinedLenses[xrayglasses.config.lens]:xrayglasses.config.lens}},e.defaults=e.prototype.defaults,s.fn.xrayglasses=function(a){return this.each(function(){new e(this,a).init()})},a.XRayGlasses=e}(window,jQuery);var predefinedLenses={};predefinedLenses["binoculars-soft"]="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1MzAiIGhlaWdodD0iMzAwIiB2aWV3Qm94PSIwIDAgNTMwIDMwMCI+PGRlZnM+PGZpbHRlciBpZD0iYSIgeD0iLS4wNiIgd2lkdGg9IjEuMTIiIHk9Ii0uMDYiIGhlaWdodD0iMS4xMiIgY29sb3ItaW50ZXJwb2xhdGlvbi1maWx0ZXJzPSJzUkdCIj48ZmVHYXVzc2lhbkJsdXIgc3RkRGV2aWF0aW9uPSI3LjUiLz48L2ZpbHRlcj48ZmlsdGVyIGlkPSJiIiB4PSItLjA2IiB3aWR0aD0iMS4xMiIgeT0iLS4wNiIgaGVpZ2h0PSIxLjEyIiBjb2xvci1pbnRlcnBvbGF0aW9uLWZpbHRlcnM9InNSR0IiPjxmZUdhdXNzaWFuQmx1ciBzdGREZXZpYXRpb249IjcuNSIvPjwvZmlsdGVyPjwvZGVmcz48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgwIC03NTIuMzYyKSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGN4PSIxNjgiIGN5PSI4ODQuMzYyIiByPSIxNTAiIHRyYW5zZm9ybT0ibWF0cml4KC44OTI4NSAwID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