You could paste the whole code into your story's JavaScript, but that would be a real mess to work with. Another option would be to load it from a CDN in your story JavaScript like so:
The only catch is that the script will be loaded asynchronously, so you'll need to wait until it's done loading before using it. See the jQuery docs for details.
function InitBackbone(){
....
}
var Backbone = Backbone || undefined;
if(Backbone) {
InitBackbone();
}else{
$.getScript('https://cdnjs.cloudflare.com/ajax/libs/backbone.js/1.2.3/backbone-min.js', function(data, textStatus){
//If CDN is not available from the Backbone - twine won't work.
//Probably, check is not necessary.
//if(textStatus == 'success'){
InitBackbone();
//}
});
}
Comments
The only catch is that the script will be loaded asynchronously, so you'll need to wait until it's done loading before using it. See the jQuery docs for details.
Did so: