github.com/Konstantin8105/c4go@v0.0.0-20240505174241-768bb1c65a51/tests/raylib/minshell.html (about) 1 <!doctype html> 2 <html lang="en-us"> 3 <head> 4 <meta charset="utf-8"> 5 <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 6 7 <title>raylib web game</title> 8 9 <meta name="title" content="raylib web game"> 10 <meta name="description" content="New raylib web videogame, developed using raylib videogames library"> 11 <meta name="keywords" content="raylib, games, html5, programming, C, C++, library, learn, videogames"> 12 <meta name="viewport" content="width=device-width"> 13 14 <!-- Open Graph metatags for sharing --> 15 <meta property="og:title" content="raylib web game"> 16 <meta property="og:image:type" content="image/png"> 17 <meta property="og:image" content="https://www.raylib.com/common/img/raylib_logo.png"> 18 <meta property="og:site_name" content="raylib.com"> 19 <meta property="og:url" content="https://www.raylib.com/games.html"> 20 <meta property="og:description" content="New raylib web videogame, developed using raylib videogames library"> 21 22 <!-- Twitter metatags for sharing --> 23 <meta name="twitter:card" content="summary"> 24 <meta name="twitter:site" content="@raysan5"> 25 <meta name="twitter:title" content="raylib web game"> 26 <meta name="twitter:image" content="https://www.raylib.com/common/raylib_logo.png"> 27 <meta name="twitter:url" content="https://www.raylib.com/games.html"> 28 <meta name="twitter:description" content="New raylib web game, developed using raylib videogames library"> 29 30 <!-- Favicon --> 31 <link rel="shortcut icon" href="https://www.raylib.com/favicon.ico"> 32 33 <style> 34 body { margin: 0px; } 35 canvas.emscripten { border: 0px none; background-color: black; } 36 </style> 37 <script type='text/javascript' src="https://cdn.jsdelivr.net/gh/eligrey/FileSaver.js/dist/FileSaver.min.js"> </script> 38 <script type='text/javascript'> 39 function saveFileFromMEMFSToDisk(memoryFSname, localFSname) // This can be called by C/C++ code 40 { 41 var isSafari = false; // Not supported, navigator.userAgent access is being restricted 42 //var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent); 43 var data = FS.readFile(memoryFSname); 44 var blob; 45 46 if (isSafari) blob = new Blob([data.buffer], { type: "application/octet-stream" }); 47 else blob = new Blob([data.buffer], { type: "application/octet-binary" }); 48 49 // NOTE: SaveAsDialog is a browser setting. For example, in Google Chrome, 50 // in Settings/Advanced/Downloads section you have a setting: 51 // 'Ask where to save each file before downloading' - which you can set true/false. 52 // If you enable this setting it would always ask you and bring the SaveAsDialog 53 saveAs(blob, localFSname); 54 } 55 </script> 56 </head> 57 <body> 58 <canvas class=emscripten id=canvas oncontextmenu=event.preventDefault() tabindex=-1></canvas> 59 <p id="output" /> 60 <script> 61 var Module = { 62 print: (function() { 63 var element = document.getElementById('output'); 64 if (element) element.value = ''; // clear browser cache 65 return function(text) { 66 if (arguments.length > 1) text = Array.prototype.slice.call(arguments).join(' '); 67 console.log(text); 68 if (element) { 69 element.value += text + "\n"; 70 element.scrollTop = element.scrollHeight; // focus on bottom 71 } 72 }; 73 })(), 74 canvas: (function() { 75 var canvas = document.getElementById('canvas'); 76 return canvas; 77 })() 78 }; 79 </script> 80 {{{ SCRIPT }}} 81 </body> 82 </html>