Skip to content

Commit cb3d802

Browse files
committed
Fixed display of scraped results
close #10
1 parent e0ad5fd commit cb3d802

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

extension/scripts/Controller.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,9 +1089,14 @@ SitemapController.prototype = {
10891089
$("#scrape-sitemap-config input").prop('disabled', true);
10901090

10911091
chrome.runtime.sendMessage(request, function (selectors) {
1092-
// table selector can dynamically add columns (addMissingColumns Feature)
1093-
sitemap.selectors = selectors;
1094-
this.browseSitemapData();
1092+
// table selector can dynamically add columns
1093+
// replace current selector (columns) with the dynamicly created once
1094+
sitemap.selectors = [];
1095+
for (var n = 0; n < selectors.length; n++){
1096+
var selector = selectors[n];
1097+
sitemap.selectors.push(new Selector(selector));
1098+
}
1099+
this.browseSitemapData();
10951100
}.bind(this));
10961101
return false;
10971102
},

extension/scripts/Sitemap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ Sitemap.prototype = {
184184

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

190190
return uniqueColumns;

0 commit comments

Comments
 (0)