Skip to content

Commit

Permalink
Add the seizureWarningEnabled variable, defaulted to true, to allow t…
Browse files Browse the repository at this point in the history
…he warning to be easily turned off
  • Loading branch information
Dan Mosedale committed Nov 23, 2011
1 parent d5feec3 commit cc7126e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions demo.html
Expand Up @@ -52,8 +52,9 @@
<script src="models/burst.data.timelines.json.lol.js"></script>

<script>
(function(window) {
var seizureWarningEnabled = true;

(function(window) {
this.gfxData = { frameCounter: 0 };
this.timerData = {
timerMilliseconds: 0,
Expand Down Expand Up @@ -274,8 +275,9 @@
intro.resize();
postMessage('loaded');
initialized = true;
canvas.style.visibility = 'hidden';

if (seizureWarningEnabled) {
canvas.style.visibility = 'hidden';
}
}

window.addEventListener('DOMContentLoaded', function() { init(); }, false);
Expand Down Expand Up @@ -540,6 +542,7 @@
<a class="seizure-warning-continue" id="seizure-warning-continue">CONTINUE</a>
</div>
<script type="text/javascript">
if (seizureWarningEnabled) {
function positionWarning(e) {
var warning = document.getElementById('seizure-warning');
var t = (window.innerHeight/2 - warning.offsetHeight/2) + "px";
Expand All @@ -560,6 +563,7 @@
window.removeEventListener('resize', positionWarning, false);
} //onWarningClick
document.getElementById('seizure-warning-continue').addEventListener('click', onWarningClick, false);
}
</script>

</body>
Expand Down

0 comments on commit cc7126e

Please sign in to comment.