[Chinese-commits] [fqterm] 21/76: Add downloadart.js
Boyuan Yang
hosiet-guest at moszumanska.debian.org
Thu Oct 27 03:16:58 UTC 2016
This is an automated email from the git hooks/post-receive script.
hosiet-guest pushed a commit to branch master
in repository fqterm.
commit 342d16f40af2e8e82892a2af3584e33eeee9235a
Author: Iru Cai <mytbk920423 at gmail.com>
Date: Thu May 8 01:52:53 2014 +0800
Add downloadart.js
---
res/script/downloadart.js | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/res/script/downloadart.js b/res/script/downloadart.js
index 8438a52..d58b7f9 100644
--- a/res/script/downloadart.js
+++ b/res/script/downloadart.js
@@ -10,15 +10,15 @@ var r = new RegExp("%");
var esc = new RegExp('\x1b\x1b','g');
var content = "";
-getAnsiLine = function(i){
- var line = fqterm.getAttrText(i).replace(esc, "\x1b[");
+getLine = function(i){
+ var line = fqterm.getText(i);
return line+"\n";
}
// first copy the previous lines
for (var i=0; i<LastLine; ++i){
// fqterm.appendFile(saveFile, getAnsiLine(i));
- content += getAnsiLine(i);
+ content += getLine(i);
}
// then copy until article ends
@@ -27,11 +27,11 @@ while (1){
if (!r.exec(line)){ // article ends
break;
}
- var prev = getAnsiLine(LastLine-1);
+ var prev = getLine(LastLine-1);
var cur;
fqterm.sendString("j");
for (var i=0; i<retries; i++){
- var cur = getAnsiLine(LastLine-1);
+ var cur = getLine(LastLine-1);
if (prev == cur){
sleep(timeout);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/chinese/fqterm.git
More information about the Chinese-commits
mailing list