21 lines
848 B
JavaScript
21 lines
848 B
JavaScript
"ui";
|
|
"use strict";
|
|
var emitter = events.emitter(threads.currentThread());
|
|
threads.start(function() {
|
|
emitter.emit("evaluate", (function(){
|
|
var resp = http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/source/SkyAutoplayer.js");
|
|
if(resp.statusCode >= 200 && resp.statusCode < 300) {
|
|
return resp.body.string();
|
|
} else {
|
|
resp = http.get("https://cdn.jsdelivr.net/gh/StageGuard/SkyAutoPlayerScript@" + http.get("https://gitee.com/stageguard/SkyAutoPlayerScript/raw/master/gitVersion").body.string() + "/source/SkyAutoplayer.js");
|
|
if(resp.statusCode >= 200 && resp.statusCode < 300) {
|
|
return resp.body.string();
|
|
} else {
|
|
return "console.show();console.log(\"Failed to load script\")";
|
|
}
|
|
}
|
|
}()));
|
|
});
|
|
emitter.on('evaluate', function(s){
|
|
eval(s);
|
|
}); |