From c407ddd65831d2c9f70b83217eb0835b6ea83036 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Fri, 21 Sep 2018 16:42:49 +0300 Subject: [PATCH] cleanup + minor tweaks... Signed-off-by: Alex A. Naanou --- ui (gen4)/features/history.js | 10 +++++----- ui (gen4)/ui.js | 8 ++++++-- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/ui (gen4)/features/history.js b/ui (gen4)/features/history.js index f210d4f5..c9241f7f 100755 --- a/ui (gen4)/features/history.js +++ b/ui (gen4)/features/history.js @@ -134,6 +134,9 @@ var URLHistoryActions = actions.Actions({ url = url || this.location.path var l = this.config['url-history-length'] || -1 + var logger = this.logger + && this.logger.push('History') + if(l == 0){ return } @@ -151,10 +154,6 @@ var URLHistoryActions = actions.Actions({ // push url to history... this.url_history[url] = item - /*this.url_history[url] = { - open: open, - check: check, - }*/ // update history length... var to_remove = Object.keys(this.url_history) @@ -169,7 +168,8 @@ var URLHistoryActions = actions.Actions({ to_remove .slice(l) .forEach(function(e){ - console.log('Removing url from history:', e) + logger + && logger.emit(`Removing URL from history: "${e}"`) that.dropURLFromHistory(e) }) }], // NOTE: url can be an index, 0 being the last url added to history; diff --git a/ui (gen4)/ui.js b/ui (gen4)/ui.js index 47f48189..242110d9 100755 --- a/ui (gen4)/ui.js +++ b/ui (gen4)/ui.js @@ -135,11 +135,15 @@ $(function(){ // XXX STUB... } else if(e == 'error' ){ ig.showProgress(['Error'].concat(msg), '+0', '+1') - console.log(' '+ (msg || []).join(': ') + ':', e, v) + console.log(msg ? + ' '+ msg.join(': ') + ':' + : '', ...arguments) } else { // console... - console.log(' '+ (msg || []).join(': ') + ':', e, v) + console.log(msg ? + ' '+ msg.join(': ') + ':' + : '', ...arguments) } // XXX