Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <!--Project Editing-->
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <title>LilCoders Editor</title>
- <noscript>
- <META HTTP-EQUIV="Refresh" CONTENT="1;URL=http://enable-javascript.com">
- </noscript>
- <script type="text/javascript">
- //<![CDATA[
- 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){};
- //]]>
- </script>
- <script src="//cdn.rawgit.com/namuol/cheet.js/master/cheet.min.js" type="text/javascript"></script>
- <!DOCTYPE html>
- <html>
- <head>
- <style>
- i {font-family: FontAwesome; font-style: normal;}
- </style>
- </head>
- <i class=icon-foo>
- <script>
- function showUser(str) {
- if (str=="") {
- document.getElementById("txtHint").innerHTML="";
- return;
- }
- if (window.XMLHttpRequest) {
- // code for IE7+, Firefox, Chrome, Opera, Safari
- xmlhttp=new XMLHttpRequest();
- } else { // code for IE6, IE5
- xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
- }
- xmlhttp.onreadystatechange=function() {
- if (this.readyState==4 && this.status==200) {
- document.getElementById("txtHint").innerHTML=this.responseText;
- }
- }
- console.log(str);
- xmlhttp.open("GET","../search.php?q="+str,true);
- xmlhttp.send();
- }
- </script>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="stylesheet" href="../w3.css">
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.6.3/css/font-awesome.min.css">
- <body class="w3-container">
- <ul class="w3-navbar w3-blue w3-center">
- <li><a class="w3-padding-16 w3-xlarge topnav-icons fa fa-home w3-left" href="../index.php"></a></li>
- <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>
- <li><a class="w3-padding-16 w3-xlarge topnav-icons fa fa-user w3-left" href="../profiles/herohamp"> Signed in as herohamp</a></li>
- <li><a class="w3-padding-16 w3-xlarge topnav-icons fa fa-sign-out w3-left" href="../signout.php"> Sign Out</a></li>
- <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>
- <!--<i class="fa fa-cog fa-spin fa-3x fa-fw"></i><span class="sr-only">Loading...</span>-->
- <!-- Hotjar Tracking Code for https://lil-coders.org -->
- <script>
- (function(h,o,t,j,a,r){
- h.hj=h.hj||function(){(h.hj.q=h.hj.q||[]).push(arguments)};
- h._hjSettings={hjid:284194,hjsv:5};
- a=o.getElementsByTagName('head')[0];
- r=o.createElement('script');r.async=1;
- r.src=t+h._hjSettings.hjid+j+h._hjSettings.hjsv;
- a.appendChild(r);
- })(window,document,'//static.hotjar.com/c/hotjar-','.js?sv=');
- </script>
- <input class="w3-input w3-border" name="search" type="search" oninput="showUser(this.value)" style="color: #0090ff;" autocomplete="off" placeholder="Search...">
- <div id="txtHint"></div>
- </ul>
- <br>
- <script>
- cheet('w w s s a d a d b a', function () {
- alert('You found it :D');
- });
- </script>
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
- <link rel="stylesheet" href="https://lil-coders.org/w3.css">
- <style>
- #editor {
- height: 300px;
- }
- </style>
- </head>
- <body>
- <noscript>
- Oh Noes! Your browser does not support LilCoders. :(
- <a href="http://enable-javascript.com">Click here to fix this.</a>
- </noscript>
- <script>var username='herohamp';</script> <script>var url='592';</script> <div class="container">
- <br>
- <h4 id="projectName">Key Press + Sprite Motion</h4>
- <script> var projectName='Key Press + Sprite Motion'</script> <div class="row">
- <div class="col-md-6">
- <pre id="editor">
- makeSprite("bill",10,10)
- var speed= Number(prompt("What Should The Sprite Speed Be? Ex - 1"));
- function draw() {
- if (keys["A"]) {
- bill.x-=speed;
- }
- if (keys["D"]) {
- bill.x+=speed;
- }
- if (keys["W"]) {
- bill.y-=speed;
- }
- if (keys["S"]) {
- bill.y+=speed;
- }
- bill.Draw()
- }</pre>
- </div>
- <div class="col-md-6">
- <script>
- var name = document.getElementById('projectName').value;
- setInterval(function() {
- localStorage.setItem("code", editor.getValue());
- }, 30000);
- window.onbeforeunload = function (e) {
- e = e || window.event;
- // For IE and Firefox prior to version 4
- if (e) {
- localStorage.setItem("code", editor.getValue())
- }
- // For Safari
- localStorage.setItem("code", editor.getValue())
- };
- function formSubmit() {
- window.onbeforeunload = null;
- }
- function save() {
- var info = {};
- info.code = window.btoa(editor.getValue());
- info.username=username;
- info.id=url;
- info.name=window.btoa(document.getElementById('projectName').value);
- info=JSON.stringify(info);
- console.log(info)
- var xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- if (xhttp.readyState == 4 && xhttp.status == 200) {
- document.getElementById("demo").innerHTML = xhttp.responseText;
- }
- };
- console.log("Sending...");
- xhttp.open("POST", "../save_project.php", true);
- xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xhttp.send("info="+info);
- console.log("sent "+info);
- }
- function deleteProject() {
- var info = {};
- info.id=url;
- info.name=projectName;
- info=JSON.stringify(info);
- console.log(info)
- var xhttp = new XMLHttpRequest();
- xhttp.onreadystatechange = function() {
- if (xhttp.readyState == 4 && xhttp.status == 200) {
- document.getElementById("demo").innerHTML = xhttp.responseText;
- }
- };
- console.log("Sending...");
- xhttp.open("POST", "../delete_project.php", true);
- xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
- xhttp.send("info="+info);
- console.log("sent "+info);
- }
- </script>
- <canvas id="player" style="border:1px solid #000000;" height="300" width="300">Oh Noes! Your browser does not support LilCoders. :(</canvas>
- <br>
- <span id="swap">
- <a href="#" class="btn btn-default" onclick="runCode()" >
- <div class="fa fa-play fa-2x" alt="Play" id="Play()"></div>
- </a>
- </span>
- <a href="#" class="btn btn-default">
- <div class="fa fa-floppy-o fa-2x" alt="Save to LocalStorage" id="Save()" onclick='localStorage.setItem("code", editor.getValue())'></div>
- </a>
- <a href="#" class="btn btn-default">
- <div class="fa fa-cloud-download fa-2x" alt="Upload LocalStorage save" id="upload()" onclick="editor.setValue(localStorage.code, 1);"></div>
- </a>
- <a href="#" class="btn btn-default">
- <img src="../img/createbutton.svg" alt="Save to lilcoders" width=48 height=48 id="save" onclick="save()"/>
- </a>
- <a href="#" class="btn btn-default">
- <div class="fa fa-trash fa-2x" alt="Delete" id="delete" onclick="deleteProject()"></div>
- </a>
- <div id="demo"></div>
- </div>
- </div>
- </div>
- <img src="https://raw.githubusercontent.com/LilCoders/Art/master/Ero.png" style="display: none;">
- <img src="https://raw.githubusercontent.com/LilCoders/Art/master/Pinky.png" style="display: none;">
- <img src="https://raw.githubusercontent.com/LilCoders/Art/master/Hero.png" style="display: none;">
- <script src="../src-noconflict/ace.js" type="text/javascript" charset="utf-8"></script>
- <script src="../src-noconflict/ext-language_tools.js" type="text/javascript" charset="utf-8"></script>
- <script>
- var player=false;
- var langTools = ace.require("../www/ace/ext/language_tools");
- var editor = ace.edit("editor");
- editor.$blockScrolling = Infinity; //Fixes errors
- editor.setTheme("../www/ace/theme/clouds");
- editor.session.setMode("../www/ace/mode/javascript");
- editor.setShowPrintMargin(false);
- editor.setOptions({
- enableBasicAutocompletion: true,
- enableSnippets: true,
- enableLiveAutocompletion: true
- });
- </script>
- <script src="../base.js" type="text/javascript" charset="utf-8"></script>
- <script src="../disable.js" type="text/javascript" charset="utf-8"></script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement