Adding ramda to bonfire

This commit is contained in:
Nathan Leniz
2015-02-09 14:20:27 -05:00
parent 0689793ef8
commit e7b0cd53ed
2 changed files with 14 additions and 2 deletions

View File

@ -67,7 +67,7 @@ var requests;
// (re)initializes the plugin
var reset = function() {
requests = 0;
plugin = new jailed.Plugin(path+'plugin_v0.1.2.js', api);
plugin = new jailed.Plugin(path+'plugin_v0.1.3.js', api);
plugin.whenDisconnected( function() {
// give some time to handle the last responce
setTimeout( function() {

View File

@ -22,6 +22,16 @@ var run = function(code) {
// protects even the worker scope from being accessed
var runHidden = function(code) {
var importScript = function(url) {
var error = null;
try {
importScripts(url);
} catch (e) {
error = e;
console.log('Unable to load ramda!');
}
};
var indexedDB = null;
var location = null;
var navigator = null;
@ -44,7 +54,9 @@ var runHidden = function(code) {
var dump = null;
var onoffline = null;
var ononline = null;
var importScripts = null;
importScript("https://cdnjs.cloudflare.com/ajax/libs/ramda/0.8.0/ramda.min.js");
var _ = R;
return eval(code);
}