Advertisement
Guest User

Untitled

a guest
Sep 24th, 2016
149
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 10.29 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <!--Project Editing-->
  4. <head>
  5. <meta charset="UTF-8">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <title>LilCoders Editor</title>
  8. <noscript>
  9. <META HTTP-EQUIV="Refresh" CONTENT="1;URL=http://enable-javascript.com">
  10. </noscript>
  11.  
  12. <script type="text/javascript">
  13. //<![CDATA[
  14. try{if (!window.CloudFlare) {var CloudFlare=[{verbose:0,p:0,byc:1,owlid:"cf",bag2:1,mirage2:0,oracle:0,paths:{cloudflare:"/cdn-cgi/nexp/dok3v=1613a3a185/"},atok:"c802af43575060c03dc70e2690a4f039",petok:"2e24a5700902b5de2b9043b52765f2584b55a383-1474762631-1800",zone:"lil-coders.org",rocket:"0",apps:{"abetterbrowser":{"ie":"9","opera":null,"chrome":null,"safari":null,"firefox":null}},sha2test:0}];!function(a,b){a=document.createElement("script"),b=document.getElementsByTagName("script")[0],a.async=!0,a.src="//ajax.cloudflare.com/cdn-cgi/nexp/dok3v=0489c402f5/cloudflare.min.js",b.parentNode.insertBefore(a,b)}()}}catch(e){};
  15. //]]>
  16. </script>
  17. <script src="//cdn.rawgit.com/namuol/cheet.js/master/cheet.min.js" type="text/javascript"></script>
  18.  
  19. <!DOCTYPE html>
  20. <html>
  21. <head>
  22. <style>
  23. i {font-family: FontAwesome; font-style: normal;}
  24. </style>
  25. </head>
  26. <i class=icon-foo>
  27. <script>
  28. function showUser(str) {
  29. if (str=="") {
  30. document.getElementById("txtHint").innerHTML="";
  31. return;
  32. }
  33. if (window.XMLHttpRequest) {
  34. // code for IE7+, Firefox, Chrome, Opera, Safari
  35. xmlhttp=new XMLHttpRequest();
  36. } else { // code for IE6, IE5
  37. xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
  38. }
  39. xmlhttp.onreadystatechange=function() {
  40. if (this.readyState==4 && this.status==200) {
  41. document.getElementById("txtHint").innerHTML=this.responseText;
  42. }
  43. }
  44. console.log(str);
  45. xmlhttp.open("GET","../search.php?q="+str,true);
  46. xmlhttp.send();
  47. }
  48. </script>
  49. <meta name="viewport" content="width=device-width, initial-scale=1">
  50. <link rel="stylesheet" href="../w3.css">
  51. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
  52. <body class="w3-container">
  53. <ul class="w3-navbar w3-blue w3-center">
  54. <li><a class="w3-padding-16 w3-xlarge topnav-icons fa fa-home w3-left" href="../index.php"></a></li>
  55. <li><a class="w3-padding-16 w3-xlarge topnav-icons fa fa-envelope w3-left" href="../notifications.php"> <span class="w3-badge w3-blue">0</span></a></li>
  56.  
  57. <li><a class="w3-padding-16 w3-xlarge topnav-icons fa fa-user w3-left" href="../profiles/herohamp"> Signed in as herohamp</a></li>
  58. <li><a class="w3-padding-16 w3-xlarge topnav-icons fa fa-sign-out w3-left" href="../signout.php"> Sign Out</a></li>
  59. <li><a class="w3-padding-16 w3-xlarge topnav-icons fa fa-pencil-square-o w3-left" href="../editor.php"> Make a Project!</a></li>
  60. <!--<i class="fa fa-cog fa-spin fa-3x fa-fw"></i><span class="sr-only">Loading...</span>-->
  61. <!-- Hotjar Tracking Code for https://lil-coders.org -->
  62. <script>
  63. (function(h,o,t,j,a,r){
  64. h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
  65. h._hjSettings={hjid:284194,hjsv:5};
  66. a=o.getElementsByTagName('head')[0];
  67. r=o.createElement('script');r.async=1;
  68. r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
  69. a.appendChild(r);
  70. })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
  71. </script>
  72. <input class="w3-input w3-border" name="search" type="search" oninput="showUser(this.value)" style="color: #0090ff;" autocomplete="off" placeholder="Search...">
  73. <div id="txtHint"></div>
  74. </ul>
  75. <br>
  76. <script>
  77. cheet('w w s s a d a d b a', function () {
  78. alert('You found it :D');
  79. });
  80. </script>
  81. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
  82. <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
  83. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
  84. <link rel="stylesheet" href="https://lil-coders.org/w3.css">
  85.  
  86. <style>
  87. #editor {
  88. height: 300px;
  89. }
  90. </style>
  91. </head>
  92. <body>
  93. <noscript>
  94. Oh Noes! Your browser does not support LilCoders. :(
  95. <a href="http://enable-javascript.com">Click here to fix this.</a>
  96. </noscript>
  97. <script>var username='herohamp';</script> <script>var url='592';</script> <div class="container">
  98. <br>
  99. <h4 id="projectName">Key Press + Sprite Motion</h4>
  100. <script> var projectName='Key Press + Sprite Motion'</script> <div class="row">
  101. <div class="col-md-6">
  102. <pre id="editor">
  103. makeSprite("bill",10,10)
  104. var speed= Number(prompt("What Should The Sprite Speed Be? Ex - 1"));
  105. function draw() {
  106. if (keys["A"]) {
  107. bill.x-=speed;
  108. }
  109. if (keys["D"]) {
  110. bill.x+=speed;
  111. }
  112. if (keys["W"]) {
  113. bill.y-=speed;
  114. }
  115. if (keys["S"]) {
  116. bill.y+=speed;
  117. }
  118. bill.Draw()
  119. }</pre>
  120. </div>
  121. <div class="col-md-6">
  122. <script>
  123. var name = document.getElementById('projectName').value;
  124. setInterval(function() {
  125. localStorage.setItem("code", editor.getValue());
  126. }, 30000);
  127. window.onbeforeunload = function (e) {
  128. e = e || window.event;
  129. // For IE and Firefox prior to version 4
  130. if (e) {
  131. localStorage.setItem("code", editor.getValue())
  132. }
  133. // For Safari
  134. localStorage.setItem("code", editor.getValue())
  135. };
  136. function formSubmit() {
  137. window.onbeforeunload = null;
  138. }
  139. function save() {
  140. var info = {};
  141. info.code = window.btoa(editor.getValue());
  142. info.username=username;
  143. info.id=url;
  144. info.name=window.btoa(document.getElementById('projectName').value);
  145. info=JSON.stringify(info);
  146. console.log(info)
  147. var xhttp = new XMLHttpRequest();
  148. xhttp.onreadystatechange = function() {
  149. if (xhttp.readyState == 4 && xhttp.status == 200) {
  150. document.getElementById("demo").innerHTML = xhttp.responseText;
  151. }
  152. };
  153. console.log("Sending...");
  154. xhttp.open("POST", "../save_project.php", true);
  155. xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  156. xhttp.send("info="+info);
  157. console.log("sent "+info);
  158. }
  159. function deleteProject() {
  160. var info = {};
  161. info.id=url;
  162. info.name=projectName;
  163. info=JSON.stringify(info);
  164. console.log(info)
  165. var xhttp = new XMLHttpRequest();
  166. xhttp.onreadystatechange = function() {
  167. if (xhttp.readyState == 4 && xhttp.status == 200) {
  168. document.getElementById("demo").innerHTML = xhttp.responseText;
  169. }
  170. };
  171. console.log("Sending...");
  172. xhttp.open("POST", "../delete_project.php", true);
  173. xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  174. xhttp.send("info="+info);
  175. console.log("sent "+info);
  176. }
  177. </script>
  178. <canvas id="player" style="border:1px solid #000000;" height="300" width="300">Oh Noes! Your browser does not support LilCoders. :(</canvas>
  179. <br>
  180. <span id="swap">
  181. <a href="#" class="btn btn-default" onclick="runCode()" >
  182. <div class="fa fa-play fa-2x" alt="Play" id="Play()"></div>
  183. </a>
  184. </span>
  185. <a href="#" class="btn btn-default">
  186. <div class="fa fa-floppy-o fa-2x" alt="Save to LocalStorage" id="Save()" onclick='localStorage.setItem("code", editor.getValue())'></div>
  187. </a>
  188. <a href="#" class="btn btn-default">
  189. <div class="fa fa-cloud-download fa-2x" alt="Upload LocalStorage save" id="upload()" onclick="editor.setValue(localStorage.code, 1);"></div>
  190. </a>
  191. <a href="#" class="btn btn-default">
  192. <img src="../img/createbutton.svg" alt="Save to lilcoders" width=48 height=48 id="save" onclick="save()"/>
  193. </a>
  194. <a href="#" class="btn btn-default">
  195. <div class="fa fa-trash fa-2x" alt="Delete" id="delete" onclick="deleteProject()"></div>
  196. </a>
  197. <div id="demo"></div>
  198. </div>
  199. </div>
  200. </div>
  201. <img src="https://raw.githubusercontent.com/LilCoders/Art/master/Ero.png" style="display: none;">
  202. <img src="https://raw.githubusercontent.com/LilCoders/Art/master/Pinky.png" style="display: none;">
  203. <img src="https://raw.githubusercontent.com/LilCoders/Art/master/Hero.png" style="display: none;">
  204. <script src="../src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
  205. <script src="../src-noconflict/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>
  206. <script>
  207. var player=false;
  208. var langTools = ace.require("../www/ace/ext/language_tools");
  209. var editor = ace.edit("editor");
  210. editor.$blockScrolling = Infinity; //Fixes errors
  211. editor.setTheme("../www/ace/theme/clouds");
  212. editor.session.setMode("../www/ace/mode/javascript");
  213. editor.setShowPrintMargin(false);
  214. editor.setOptions({
  215. enableBasicAutocompletion: true,
  216. enableSnippets: true,
  217. enableLiveAutocompletion: true
  218. });
  219. </script>
  220. <script src="../base.js" type="text/javascript" charset="utf-8"></script>
  221. <script src="../disable.js" type="text/javascript" charset="utf-8"></script>
  222. </body>
  223. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement