Skip to content

Commit

Permalink
Added Zen mode link which removes all chrome
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeGinnivan authored and Jake Ginnivan committed Jun 17, 2014
1 parent dcd7e6a commit bf5d8bd
Showing 1 changed file with 36 additions and 1 deletion.
37 changes: 36 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,12 @@ <h2>Specific Examples</h2>
</div>
<div class="twocol last">
<a id="open-freeplay" class="openswitch" href="#">Free Playground</a>
<a id="open-zen" class="openswitch" href="#">Zen Mode</a>
</div>
</div>
<div id="ExplainGitZen-Container" style="display:none">
<div class="playground-container"></div>
</div>
</div>

<svg version="1.1" baseProfile="full"
Expand Down Expand Up @@ -713,5 +717,36 @@ <h2>Specific Examples</h2>
openSwitch.addEventListener('click', open, false);
});
</script>
<script type="text/javascript">
require(['explaingit'], function (explainGit) {
var openSwitch = document.getElementById('open-zen'),
open;

open = function () {
var elements = document.getElementsByClassName('row');
for(var i = 0; i != elements.length; ++i)
{
elements[i].style.display = 'none';
}
document.getElementById('fork-me').style.display = 'none';
explainGit.reset();

explainGit.open({
name: 'Zen',
height: 500,
commitData: [
{id: 'e137e9b', tags: ['origin/master', 'master']}
],
originData: [
{id: 'e137e9b', tags: ['master']}
],
initialMessage:
'Have fun.'
});
};

openSwitch.addEventListener('click', open, false);
});
</script>
</body>
</html>
</html>

0 comments on commit bf5d8bd

Please sign in to comment.