summaryrefslogtreecommitdiff
path: root/res/script/qz.js
blob: 9a98bab938f0d897c354a48788c1cc7b0d1035dd (plain)
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
fqterm.importFile("libpost.js");
fqterm.importFile("testz.js");

qz=function(){
    articleID = lastPost();
    ++articleID;
    var IDStr=isz(articleID);
    if (IDStr==-1){
	var cont = true;
	try
	{
	    if (fqterm.yesnoBox("似乎不是整哦,继续抢吗?")==false){
		cont = false;
	    }
	}
	catch(err)
	{
	}
	if (cont){
	    IDStr = articleID;
	}else{
	    return;
	}
    }
    postEmpty(IDStr);
    if (isBoard()){
	fqterm.sendString("j=_"); //focus to the new post
	sleep(500);
	myFile=copyline();
	fqterm.sendString("E"); //Edit the post
	pastefile(myFile);
    }
}

qz();