diff options
| author | raysan5 <[email protected]> | 2020-12-24 13:33:18 +0100 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2020-12-24 13:33:18 +0100 |
| commit | 9af7993bece49faf5e86d049d57633294b2d33b3 (patch) | |
| tree | 38de00cb808c9963d547ee25703fe6fde68c03dc /examples | |
| parent | aedfec981fdfea983a58a3e84821827cd14c1ead (diff) | |
| download | raylib.com-9af7993bece49faf5e86d049d57633294b2d33b3.tar.gz raylib.com-9af7993bece49faf5e86d049d57633294b2d33b3.zip | |
Update examples loader.html
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/web/audio/loader.html | 13 | ||||
| -rw-r--r-- | examples/web/core/loader.html | 13 | ||||
| -rw-r--r-- | examples/web/models/loader.html | 13 | ||||
| -rw-r--r-- | examples/web/physics/loader.html | 13 | ||||
| -rw-r--r-- | examples/web/shaders/loader.html | 13 | ||||
| -rw-r--r-- | examples/web/shapes/loader.html | 13 | ||||
| -rw-r--r-- | examples/web/text/loader.html | 13 |
7 files changed, 70 insertions, 21 deletions
diff --git a/examples/web/audio/loader.html b/examples/web/audio/loader.html index f0ff4d7..7018bac 100644 --- a/examples/web/audio/loader.html +++ b/examples/web/audio/loader.html @@ -51,8 +51,14 @@ </style> <script type="text/javascript"> - $(document).ready(function() { - + $(document).ready(function() + { + window.addEventListener('keydown', function(e) + { + // Prevent SPACE key to scroll page + if ((e.keyCode == 32) && (e.target == document.body)) e.preventDefault(); + }); + var mainUrl = $(location).attr('href'); var name = mainUrl.slice(mainUrl.indexOf('=') + 1); @@ -68,7 +74,8 @@ $('#eximage img').attr('src', imgUrl); - $.get(srcUrl, function(data) { + $.get(srcUrl, function(data) + { $('pre code').text(data); $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, 'text'); diff --git a/examples/web/core/loader.html b/examples/web/core/loader.html index f0ff4d7..1cedc34 100644 --- a/examples/web/core/loader.html +++ b/examples/web/core/loader.html @@ -51,8 +51,14 @@ </style> <script type="text/javascript"> - $(document).ready(function() { - + $(document).ready(function() + { + window.addEventListener('keydown', function(e) + { + // Prevent SPACE key to scroll page + if ((e.keyCode == 32) && (e.target == document.body)) e.preventDefault(); + }); + var mainUrl = $(location).attr('href'); var name = mainUrl.slice(mainUrl.indexOf('=') + 1); @@ -68,7 +74,8 @@ $('#eximage img').attr('src', imgUrl); - $.get(srcUrl, function(data) { + $.get(srcUrl, function(data) + { $('pre code').text(data); $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, 'text'); diff --git a/examples/web/models/loader.html b/examples/web/models/loader.html index 40cbce7..e1f6707 100644 --- a/examples/web/models/loader.html +++ b/examples/web/models/loader.html @@ -51,8 +51,14 @@ </style> <script type="text/javascript"> - $(document).ready(function() { - + $(document).ready(function() + { + window.addEventListener('keydown', function(e) + { + // Prevent SPACE key to scroll page + if ((e.keyCode == 32) && (e.target == document.body)) e.preventDefault(); + }); + var mainUrl = $(location).attr('href'); var name = mainUrl.slice(mainUrl.indexOf('=') + 1); @@ -68,7 +74,8 @@ $('#eximage img').attr('src', imgUrl); - $.get(srcUrl, function(data) { + $.get(srcUrl, function(data) + { $('pre code').text(data); $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, 'text'); diff --git a/examples/web/physics/loader.html b/examples/web/physics/loader.html index f0ff4d7..1cedc34 100644 --- a/examples/web/physics/loader.html +++ b/examples/web/physics/loader.html @@ -51,8 +51,14 @@ </style> <script type="text/javascript"> - $(document).ready(function() { - + $(document).ready(function() + { + window.addEventListener('keydown', function(e) + { + // Prevent SPACE key to scroll page + if ((e.keyCode == 32) && (e.target == document.body)) e.preventDefault(); + }); + var mainUrl = $(location).attr('href'); var name = mainUrl.slice(mainUrl.indexOf('=') + 1); @@ -68,7 +74,8 @@ $('#eximage img').attr('src', imgUrl); - $.get(srcUrl, function(data) { + $.get(srcUrl, function(data) + { $('pre code').text(data); $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, 'text'); diff --git a/examples/web/shaders/loader.html b/examples/web/shaders/loader.html index 420f1b9..cc59a22 100644 --- a/examples/web/shaders/loader.html +++ b/examples/web/shaders/loader.html @@ -51,8 +51,14 @@ </style> <script type="text/javascript"> - $(document).ready(function() { - + $(document).ready(function() + { + window.addEventListener('keydown', function(e) + { + // Prevent SPACE key to scroll page + if ((e.keyCode == 32) && (e.target == document.body)) e.preventDefault(); + }); + var mainUrl = $(location).attr('href'); var name = mainUrl.slice(mainUrl.indexOf('=') + 1); @@ -68,7 +74,8 @@ $('#eximage img').attr('src', imgUrl); - $.get(srcUrl, function(data) { + $.get(srcUrl, function(data) + { $('pre code').text(data); $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, 'text'); diff --git a/examples/web/shapes/loader.html b/examples/web/shapes/loader.html index f0ff4d7..1cedc34 100644 --- a/examples/web/shapes/loader.html +++ b/examples/web/shapes/loader.html @@ -51,8 +51,14 @@ </style> <script type="text/javascript"> - $(document).ready(function() { - + $(document).ready(function() + { + window.addEventListener('keydown', function(e) + { + // Prevent SPACE key to scroll page + if ((e.keyCode == 32) && (e.target == document.body)) e.preventDefault(); + }); + var mainUrl = $(location).attr('href'); var name = mainUrl.slice(mainUrl.indexOf('=') + 1); @@ -68,7 +74,8 @@ $('#eximage img').attr('src', imgUrl); - $.get(srcUrl, function(data) { + $.get(srcUrl, function(data) + { $('pre code').text(data); $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, 'text'); diff --git a/examples/web/text/loader.html b/examples/web/text/loader.html index f0ff4d7..1cedc34 100644 --- a/examples/web/text/loader.html +++ b/examples/web/text/loader.html @@ -51,8 +51,14 @@ </style> <script type="text/javascript"> - $(document).ready(function() { - + $(document).ready(function() + { + window.addEventListener('keydown', function(e) + { + // Prevent SPACE key to scroll page + if ((e.keyCode == 32) && (e.target == document.body)) e.preventDefault(); + }); + var mainUrl = $(location).attr('href'); var name = mainUrl.slice(mainUrl.indexOf('=') + 1); @@ -68,7 +74,8 @@ $('#eximage img').attr('src', imgUrl); - $.get(srcUrl, function(data) { + $.get(srcUrl, function(data) + { $('pre code').text(data); $('pre code').each(function(i, e) {hljs.highlightBlock(e)}); }, 'text'); |
