Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

revert to base commonjs require

  • Loading branch information...
commit bce543680c43eb2f97a1b41063f15e6ef4c5d932 1 parent a8e9d53
@brianleroux brianleroux authored
Showing with 1 addition and 16 deletions.
  1. +1 −16 src/comikit/droidscript/DroidScriptActivity.java
View
17 src/comikit/droidscript/DroidScriptActivity.java
@@ -526,22 +526,7 @@ public Interpreter setActivity(Activity activity)
{
DroidScriptAssetProvider provider = new DroidScriptAssetProvider(activity);
Require require = new Require(context, scope, provider, null, null, true);
- // require.install(scope);
- // adding as 'private' for the moment so we can override Packages.whatever.whatever
- /*
- var require = function(id) {
- if (id.match(/packages/)) {
- var pkg = id.replace(/\//g,'.')
- , pkg = pkg.charAt(0).toUpperCase() + pkg.slice(1)
- return eval(pkg)
- }
- else {
- return __require(id);
- }
- };
- */
- ScriptableObject.putProperty(scope, "__require", this);
-
+ require.install(scope);
// Set the global JavaScript variable Activity.
ScriptableObject.putProperty(scope, "Activity", Context.javaToJS(activity, scope));
return this;
Please sign in to comment.
Something went wrong with that request. Please try again.