-
Notifications
You must be signed in to change notification settings - Fork 0
/
beta.js
45 lines (41 loc) · 1.31 KB
/
beta.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
"ui";
PowerLauncherBetaTestRunning=(function(){
var read=function(path){
try{
var str="";
var file=new java.io.File(path);
var reader = new java.io.FileReader(file);
var buffer = java.lang.reflect.Array.newInstance(java.lang.Character.TYPE,file.length());
var charread = 0;
reader.read(buffer)
str=(new java.lang.String(buffer)).toString();
reader.close();
return str;
}catch(e){
print(e.toString());
}
}
var path=null;
try{
path=""+libs_inthis.getIntent().getStringExtra("path");
}catch(err){
try{
path=""+engines.myEngine().getSource();
}catch(err){
}
//path=""//write your current abs path(no last '/')
}
//console.log(path)
path=""+path
path=path.replace(/\/beta.js$/,"")
//print(path)
var manifest=JSON.parse(""+read(path+"/package.json"));
var code=read(path+"/loader/"+manifest.loader+"/"+manifest.loader+".dev.js");
code=String(code
.replace("{{PATH}}",""+path)
.replace("\u200B","")).toString()
//print(code)
this.eval(code)
return read(path+"/loader/"+manifest.loader+"/dist/output.bin.js")
})
eval(""+PowerLauncherBetaTestRunning())//