modularize init script

This commit is contained in:
hyb1996
2017-05-09 15:47:31 +08:00
parent 08654b8f90
commit 956f064737
28 changed files with 451 additions and 667 deletions

View File

@@ -0,0 +1,38 @@
module.exports = function(__runtime__, scope){
scope.toast = function(text){
__runtime__.toast(text);
}
scope.sleep = function(millis){
__runtime__.sleep(millis);
}
scope.isStopped = function(){
return __runtime__.isStopped();
}
scope.notStopped = function(){
return !isStopped();
}
scope.stop = function(){
__runtime__.stop();
}
scope.setClip = function(text){
__runtime__.setClip(text);
}
scope.getClip = function(text){
return __runtime__.getClip();
}
scope.currentPackage = function(){
return __runtime__.info.getLatestPackage();
}
scope.currentActivity = function(){
return __runtime__.info.getLatestActivity();
}
}