Skip to content

Instantly share code, notes, and snippets.

@TechplexEngineer
Created December 19, 2011 05:25
Show Gist options
  • Save TechplexEngineer/1495529 to your computer and use it in GitHub Desktop.
Save TechplexEngineer/1495529 to your computer and use it in GitHub Desktop.
Is there a way to make this work?
var q = $.parseQuery();
if(!q.plugin)//If the value isn't set
window.location = "./"; //Go to the index file
yepnope([{
test: q.plugin === 'javascript',
yep: 'plugins/javascript.js',
nope: yepnope([{
test: q.plugin === 'arduino',
yep: 'plugins/arduino.js',
nope: yepnope([{
test: q.plugin === 'frcjava',
yep: 'plugins/frcjava.js',
nope: function() {alert("error");} //What if none of the tests are true.
}])
}])
}]);
//In theory this will run the tests and if none of them are true, then It should call the alert()
@SlexAxton
Copy link

Just wanted to close this thread with a quick "boo-yah" cause I'm in that kind of mood. Programming is fun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment