Commit a0e7e624a5e81ce0dcd3a91ea4c783ffc2b75be3

Authored by David Guilherme
1 parent 020ecc65
Exists in master

Fix window size

Showing 3 changed files with 5 additions and 7 deletions   Show diff stats
1 -(function () {  
2 - var $player = document.getElementById('player'); 1 +document.addEventListener("DOMContentLoaded", function(event) {
  2 + var $player = document.getElementById('canvas');
3 3
4 $player.width = window.innerWidth; 4 $player.width = window.innerWidth;
5 - $player.height = window.innerHeight;  
6 -})();  
7 \ No newline at end of file 5 \ No newline at end of file
  6 + $player.height = window.innerHeight;
  7 +});
8 \ No newline at end of file 8 \ No newline at end of file
app/window.html
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <body class="template"> 12 <body class="template">
13 <p class="header"><span>Unity WebGL Player | </span>VLibrasTest</p> 13 <p class="header"><span>Unity WebGL Player | </span>VLibrasTest</p>
14 <div class="template-wrap clear"> 14 <div class="template-wrap clear">
15 - <canvas id="player" class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas> 15 + <canvas class="emscripten" id="canvas" oncontextmenu="event.preventDefault()"></canvas>
16 </div> 16 </div>
17 <p class="footer">&laquo; created with <a href="http://unity3d.com/" title="Go to unity3d.com">Unity</a> &raquo;</p> 17 <p class="footer">&laquo; created with <a href="http://unity3d.com/" title="Go to unity3d.com">Unity</a> &raquo;</p>
18 <script src="connect.js"></script> 18 <script src="connect.js"></script>
@@ -15,8 +15,6 @@ chrome.contextMenus.onClicked.addListener( function () { @@ -15,8 +15,6 @@ chrome.contextMenus.onClicked.addListener( function () {
15 url: "app/window.html", 15 url: "app/window.html",
16 top: 10, 16 top: 10,
17 left: 10, 17 left: 10,
18 - width: 500,  
19 - height: 500,  
20 type: "popup" 18 type: "popup"
21 }, function (w) { 19 }, function (w) {
22 popup = w; 20 popup = w;