Skip to content

Instantly share code, notes, and snippets.

@TechplexEngineer
Created December 20, 2011 02:45
Show Gist options
  • Save TechplexEngineer/1499992 to your computer and use it in GitHub Desktop.
Save TechplexEngineer/1499992 to your computer and use it in GitHub Desktop.
<script>
var q = $.parseQuery();
if(!q.plugin)//If the value isn't set
window.location = "./"; //Go to the index file
var testRes = ({
"javascript" : "plugins/javascript.js",
"arduino" : "plugins/arduino.js",
"frcjava" : "plugins/frcjava.js"
})[ q.plugin ];
yepnope({
test : testRes,
yep : testRes,
complete : function () {
if(! testRes){
window.location = "./";
alert('Sorry the plugin: \"'+q.plugin+' does not exist');
}
}
});
</script>
/* blocks.js regex.
if(!vartypes[type])
return a;
<span class="string socket" title="this is a string socket. You can type in a value or drag in a matching value block"><input type="" text""=""></span>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment