diff --git a/src/app/js/app.js b/src/app/js/app.js index 686f356..61d458c 100644 --- a/src/app/js/app.js +++ b/src/app/js/app.js @@ -1,68 +1,93 @@ -$(function(){ +$(function() { var download_progress = $('#download-progress'); var out = $('#output'); const ipcRenderer = require('electron').ipcRenderer; const request = require('request'); - const {dialog} = require('electron').remote; + const { + dialog + } = require('electron').remote; var cache = {}; var path = ""; ipcRenderer.on('download-progress', function(event, arg) { - console.log(arg); // prints "pong" - $('#download-progress-'+arg.id).css("width",arg.percent); - $('#download-progress-'+arg.id).html(arg.percent); + console.log(arg); // prints "pong" + $('#download-progress-' + arg.id).css("width", arg.percent); + $('#download-progress-' + arg.id).html(arg.percent); }); ipcRenderer.on('process-fin', function(event, arg) { - console.log(arg); // prints "pong" - $('#download-progress-'+arg.id).css("width",arg.percent); - $('#download-progress-'+arg.id).html("CONVERTED"); + console.log(arg); // prints "pong" + $('#download-progress-' + arg.id).css("width", arg.percent); + $('#download-progress-' + arg.id).html("CONVERTED"); }); ipcRenderer.on('file', function(event, arg) { - console.log(arg); // prints "pong" - $('#body-'+arg.id).append('