Skip to content

Commit

Permalink
Merge pull request #111 from eternal-flame-AD/build
Browse files Browse the repository at this point in the history
prepare for build dist
  • Loading branch information
_eternal_flame authored Aug 5, 2018
2 parents 0248b38 + 05cf46e commit 98825ed
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
11 changes: 6 additions & 5 deletions src/app/class/PxerHtmlParser.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,14 +92,15 @@ PxerHtmlParser.parsePage = function (task) {
};
break;
case "bookmark_new":
var data = JSON.parse(task.html);
for (var task of data['contents']) {
var dom = PxerHtmlParser.HTMLParser(task.html);
var data = JSON.parse(dom.body.querySelector("div#js-mount-point-latest-following").getAttribute("data-items"));
for (var task of data) {

var task = new PxerWorksRequest({
html : {},
type : this.parseIllustType(task['illust_type']),
isMultiple: task['illust_page_count'] > 1,
id : task['illust_id'].toString(),
type : this.parseIllustType(task.illustType),
isMultiple: task.pageCount > 1,
id : task.illustId.toString(),
});
task.url = PxerHtmlParser.getUrlList(task);

Expand Down
4 changes: 2 additions & 2 deletions src/app/class/PxerPrinter.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ PxerPrinter.prototype['generateUgoiraScript'] =function(frames) {
lines.push("{ hash ffmpeg 2>/dev/null && ffmpeg=ffmpeg;} || { [ -x ./ffmpeg ] && ffmpeg=./ffmpeg;} || { echo >&2 \"Failed to locate ffmpeg executable. Aborting.\"; exit 1;}");
lines.push("read -p '请输入输出文件扩展名(mp4/gif/...):' ext");
}
for (key in frames) {
for (let key in frames) {
var foldername = key + "_ugoira" + resstring;
var confpath = foldername + "/config.txt";
var height = frames[key].height;
Expand All @@ -211,7 +211,7 @@ PxerPrinter.prototype['generateUgoiraScript'] =function(frames) {
width = parseInt(width/scale);
}
lines.push(isWindows?("del "+ foldername + "\\config.txt >nul 2>nul"):("rm "+ foldername + "/config.txt &> /dev/null"));
for (frame of frames[key].framedef) {
for (let frame of frames[key].framedef) {
lines.push("echo file "+slashstr+"'" + frame['file']+ slashstr +"' >> "+confpath);
lines.push("echo duration " + frame['delay']/1000 + " >> "+ confpath);
}
Expand Down
2 changes: 1 addition & 1 deletion src/view/vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ afterLoad(function(){
printWorks(){
this.pxer.printWorks();
var sanitizedpfConfig = {};
for (key in this.pxer.pfConfig) {
for (let key in this.pxer.pfConfig) {
sanitizedpfConfig[key] = this.pxer.pfConfig[key].length?this.pxer.pfConfig[key].length:this.pxer.pfConfig[key];
}
this.analytics.postData("pxer.app.print", {
Expand Down

0 comments on commit 98825ed

Please sign in to comment.