<commit_before><!doctype html>
<html lang="en-us">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Unity WebGL Player | AngryBots</title>
    <link rel="stylesheet" href="TemplateData/style.css">
    <link rel="shortcut icon" href="TemplateData/favicon.ico" />
    <script src="TemplateData/UnityProgress.js"></script>
  </head>
  <body class="template" scroll="no" style="overflow: hidden; margin: 0px; background-color: black;">
<!--    <p class="header"><span>Unity WebGL Player | </span>AngryBots</p>
    <div class="template-wrap clear"> -->
    <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" height="600px" width="938px"></canvas>
  <!--
      <div class="logo"></div>
      <div class="fullscreen"><img src="TemplateData/fullscreen.png" width="38" height="38" alt="Fullscreen" title="Fullscreen" onclick="SetFullscreen(1);" /></div>
      <div class="title">AngryBots</div>
    </div>
    <p class="footer">&laquo; created with <a href="http://unity3d.com/" title="Go to unity3d.com">Unity</a> &raquo;</p>
  -->

    <script type='text/javascript'>

function softFullscreenResizeWebGLRenderTarget() {
  var inHiDPIFullscreenMode = true;
  var inAspectRatioFixedFullscreenMode = false;
  var inPixelPerfectFullscreenMode = true;
  var inCenteredWithoutScalingFullscreenMode = false;
  var screenWidth = inHiDPIFullscreenMode ? Math.round(window.innerWidth*window.devicePixelRatio) : window.innerWidth;
  var screenHeight = inHiDPIFullscreenMode ? Math.round(window.innerHeight*window.devicePixelRatio) : window.innerHeight;
//  var screenWidth = screen.width * window.devicePixelRatio;
//  var screenHeight = screen.height * window.devicePixelRatio;
  var w = screenWidth;
  var h = screenHeight;
  var canvas = Module['canvas'];
  var x = canvas.width;
  var y = canvas.height;
  var topMargin;

  if (inAspectRatioFixedFullscreenMode) {
    if (w*y < x*h) h = (w * y / x) | 0;
    else if (w*y > x*h) w = (h * x / y) | 0;
    topMargin = ((screenHeight - h) / 2) | 0;
  }

  if (inPixelPerfectFullscreenMode) {
    canvas.width = w;
    canvas.height = h;
    console.log('new canvas size: ' + w + 'x' + h);
    if (canvas.GLctxObject) canvas.GLctxObject.GLctx.viewport(0, 0, canvas.width, canvas.height);
  }

  // Back to CSS pixels.
  if (inHiDPIFullscreenMode) {
    topMargin /= window.devicePixelRatio;
    w /= window.devicePixelRatio;
    h /= window.devicePixelRatio;
    // Round to nearest 4 digits of precision.
    w = Math.round(w*1e4)/1e4;
    h = Math.round(h*1e4)/1e4;
    topMargin = Math.round(topMargin*1e4)/1e4;
  }
/*
  if (inCenteredWithoutScalingFullscreenMode) {
    var t = (window.innerHeight - parseInt(canvas.style.height)) / 2;
    var b = (window.innerWidth - parseInt(canvas.style.width)) / 2;
    __setLetterbox(canvas, t, b);
  } else {
    canvas.style.width = w + 'px';
    canvas.style.height = h + 'px';
    var b = (window.innerWidth - w) / 2;
    __setLetterbox(canvas, topMargin, b);
  }
*/  
  canvas.style.width = w + 'px';
  canvas.style.height = h + 'px';
}

document.getElementById('canvas').style.width = window.innerWidth + 'px';
document.getElementById('canvas').style.height = window.innerHeight + 'px';
document.getElementById('canvas').width = window.innerWidth * window.devicePixelRatio;
document.getElementById('canvas').height = window.innerHeight * window.devicePixelRatio;
window.addEventListener('resize', softFullscreenResizeWebGLRenderTarget);
</script>

<script type='text/javascript'>
  var Module = {
    TOTAL_MEMORY: 268435456,
    errorhandler: null,			// arguments: err, url, line. This function must return 'true' if the error is handled, otherwise 'false'
    compatibilitycheck: null,
    dataUrl: "Release/AngryBots.data",
    codeUrl: "Release/AngryBots.js",
    memUrl: "Release/AngryBots.mem",
  };

  var xhr = new XMLHttpRequest();
  xhr.open('GET', 'AngryBots.wasm', true);
  xhr.responseType = 'arraybuffer';
  xhr.onload = function() {
    Module.wasmBinary = xhr.response;

    var codeXHR = new XMLHttpRequest();
    codeXHR.open('GET', 'Release/UnityLoader.js', true);
    codeXHR.onload = function() {
      var code = codeXHR.responseText;
      var blob = new Blob([code], {type: 'text/javascript'});
      codeXHR = null;
      var src = URL.createObjectURL(blob);
      var script = document.createElement('script');
      script.src = URL.createObjectURL(blob);
      script.onload = function() {
        URL.revokeObjectURL(script.src);
      };
      document.body.appendChild(script);
    }
    codeXHR.send(null);
  };
  xhr.send(null);

</script>

<commit_msg>add compatibility check to AngryBots page itself<commit_after><!doctype html>
<html lang="en-us">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>Unity WebGL Player | AngryBots</title>
    <link rel="stylesheet" href="TemplateData/style.css">
    <link rel="shortcut icon" href="TemplateData/favicon.ico" />
    <script src="TemplateData/UnityProgress.js"></script>
  </head>
  <body class="template" scroll="no" style="overflow: hidden; margin: 0px; background-color: black;">
<!--    <p class="header"><span>Unity WebGL Player | </span>AngryBots</p>
    <div class="template-wrap clear"> -->
    <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()" height="600px" width="938px"></canvas>
  <!--
      <div class="logo"></div>
      <div class="fullscreen"><img src="TemplateData/fullscreen.png" width="38" height="38" alt="Fullscreen" title="Fullscreen" onclick="SetFullscreen(1);" /></div>
      <div class="title">AngryBots</div>
    </div>
    <p class="footer">&laquo; created with <a href="http://unity3d.com/" title="Go to unity3d.com">Unity</a> &raquo;</p>
  -->

    <script type='text/javascript'>

function softFullscreenResizeWebGLRenderTarget() {
  var inHiDPIFullscreenMode = true;
  var inAspectRatioFixedFullscreenMode = false;
  var inPixelPerfectFullscreenMode = true;
  var inCenteredWithoutScalingFullscreenMode = false;
  var screenWidth = inHiDPIFullscreenMode ? Math.round(window.innerWidth*window.devicePixelRatio) : window.innerWidth;
  var screenHeight = inHiDPIFullscreenMode ? Math.round(window.innerHeight*window.devicePixelRatio) : window.innerHeight;
//  var screenWidth = screen.width * window.devicePixelRatio;
//  var screenHeight = screen.height * window.devicePixelRatio;
  var w = screenWidth;
  var h = screenHeight;
  var canvas = Module['canvas'];
  var x = canvas.width;
  var y = canvas.height;
  var topMargin;

  if (inAspectRatioFixedFullscreenMode) {
    if (w*y < x*h) h = (w * y / x) | 0;
    else if (w*y > x*h) w = (h * x / y) | 0;
    topMargin = ((screenHeight - h) / 2) | 0;
  }

  if (inPixelPerfectFullscreenMode) {
    canvas.width = w;
    canvas.height = h;
    console.log('new canvas size: ' + w + 'x' + h);
    if (canvas.GLctxObject) canvas.GLctxObject.GLctx.viewport(0, 0, canvas.width, canvas.height);
  }

  // Back to CSS pixels.
  if (inHiDPIFullscreenMode) {
    topMargin /= window.devicePixelRatio;
    w /= window.devicePixelRatio;
    h /= window.devicePixelRatio;
    // Round to nearest 4 digits of precision.
    w = Math.round(w*1e4)/1e4;
    h = Math.round(h*1e4)/1e4;
    topMargin = Math.round(topMargin*1e4)/1e4;
  }
/*
  if (inCenteredWithoutScalingFullscreenMode) {
    var t = (window.innerHeight - parseInt(canvas.style.height)) / 2;
    var b = (window.innerWidth - parseInt(canvas.style.width)) / 2;
    __setLetterbox(canvas, t, b);
  } else {
    canvas.style.width = w + 'px';
    canvas.style.height = h + 'px';
    var b = (window.innerWidth - w) / 2;
    __setLetterbox(canvas, topMargin, b);
  }
*/  
  canvas.style.width = w + 'px';
  canvas.style.height = h + 'px';
}

document.getElementById('canvas').style.width = window.innerWidth + 'px';
document.getElementById('canvas').style.height = window.innerHeight + 'px';
document.getElementById('canvas').width = window.innerWidth * window.devicePixelRatio;
document.getElementById('canvas').height = window.innerHeight * window.devicePixelRatio;
window.addEventListener('resize', softFullscreenResizeWebGLRenderTarget);
</script>

<script type='text/javascript'>
  var Module = {
    TOTAL_MEMORY: 268435456,
    errorhandler: null,			// arguments: err, url, line. This function must return 'true' if the error is handled, otherwise 'false'
    compatibilitycheck: null,
    dataUrl: "Release/AngryBots.data",
    codeUrl: "Release/AngryBots.js",
    memUrl: "Release/AngryBots.mem",
    compatibilitycheck: function() {
      if (typeof Wasm !== 'object') (alert("You need a browser which supports WebAssembly to run this content. See the WebAssembly demo page for instructions."), window.history.back());
      hasWebGL ? mobile ? confirm("Please note that Unity WebGL is not currently supported on mobiles. Press Ok if you wish to continue anyway.") || window.history.back() : -1 == browser.indexOf("Firefox") && -1 == browser.indexOf("Chrome") && -1 == browser.indexOf("Safari") && (confirm("Please note that your browser is not currently supported for this Unity WebGL content. Try installing Firefox, or press Ok if you wish to continue anyway.") || window.history.back()) : (alert("You need a browser which supports WebGL to run this content. Try installing Firefox."), window.history.back())
    },
  };

  var xhr = new XMLHttpRequest();
  xhr.open('GET', 'AngryBots.wasm', true);
  xhr.responseType = 'arraybuffer';
  xhr.onload = function() {
    Module.wasmBinary = xhr.response;

    var codeXHR = new XMLHttpRequest();
    codeXHR.open('GET', 'Release/UnityLoader.js', true);
    codeXHR.onload = function() {
      var code = codeXHR.responseText;
      var blob = new Blob([code], {type: 'text/javascript'});
      codeXHR = null;
      var src = URL.createObjectURL(blob);
      var script = document.createElement('script');
      script.src = URL.createObjectURL(blob);
      script.onload = function() {
        URL.revokeObjectURL(script.src);
      };
      document.body.appendChild(script);
    }
    codeXHR.send(null);
  };
  xhr.send(null);

</script>


{'fraction_non_alphanumeric': 0.15081049787726747, 'fraction_numerical': 0.00974527209571594, 'mean_word_length': 3.9380657455931396, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 83, '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': '1327481', 'n_tokens_mistral': 3441, 'n_tokens_neox': 3362, 'n_words': 753}