Skip to content

Commit

Permalink
Fixed display of scraped results
Browse files Browse the repository at this point in the history
close #10
  • Loading branch information
jwillmer committed Jun 3, 2017
1 parent e0ad5fd commit cb3d802
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions extension/scripts/Controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -1089,9 +1089,14 @@ SitemapController.prototype = {
$("#scrape-sitemap-config input").prop('disabled', true);

chrome.runtime.sendMessage(request, function (selectors) {
// table selector can dynamically add columns (addMissingColumns Feature)
sitemap.selectors = selectors;
this.browseSitemapData();
// table selector can dynamically add columns
// replace current selector (columns) with the dynamicly created once
sitemap.selectors = [];
for (var n = 0; n < selectors.length; n++){
var selector = selectors[n];
sitemap.selectors.push(new Selector(selector));
}
this.browseSitemapData();
}.bind(this));
return false;
},
Expand Down
2 changes: 1 addition & 1 deletion extension/scripts/Sitemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ Sitemap.prototype = {

var uniqueColumns = [];
$.each(columns, function (i, e) {
if ($.inArray(e, result) == -1) result.push(e);
if ($.inArray(e, uniqueColumns) == -1) uniqueColumns.push(e);
});

return uniqueColumns;
Expand Down

0 comments on commit cb3d802

Please sign in to comment.