Created
December 19, 2011 05:25
-
-
Save TechplexEngineer/1495529 to your computer and use it in GitHub Desktop.
Is there a way to make this work?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Just wanted to close this thread with a quick "boo-yah" cause I'm in that kind of mood. Programming is fun.