add screen capture and color searching
This commit is contained in:
@@ -9,20 +9,7 @@ module.exports = function(__runtime__, scope){
|
||||
scope[method] = (function(method) {
|
||||
return function(){
|
||||
var s = selector();
|
||||
//这里不知道怎么写。尴尬。只能写成这样。
|
||||
if(arguments.length == 0){
|
||||
return s[method]();
|
||||
}else if(arguments.length == 1){
|
||||
return s[method](arguments[0]);
|
||||
}else if(arguments.length == 2){
|
||||
return s[method](arguments[0], arguments[1]);
|
||||
}else if(arguments.length == 3){
|
||||
return s[method](arguments[0], arguments[1], arguments[2]);
|
||||
}else if(arguments.length == 4){
|
||||
return s[method](arguments[0], arguments[1], arguments[2], arguments[3]);
|
||||
}else{
|
||||
return s[method].call(s, Array.prototype.slice.call(arguments));
|
||||
}
|
||||
return s[method].apply(s, Array.prototype.slice.call(arguments));
|
||||
};
|
||||
})(method);
|
||||
}
|
||||
@@ -33,4 +20,3 @@ module.exports = function(__runtime__, scope){
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user