Spaces:
Sleeping
Sleeping
Update templates/index.html
Browse filesadd extract insight when analyzing all in once
- templates/index.html +12 -0
templates/index.html
CHANGED
@@ -906,6 +906,18 @@
|
|
906 |
scoreCell.style.fontWeight = 'bold';
|
907 |
scoreCell.style.textAlign = 'center';
|
908 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
909 |
} else {
|
910 |
scoreCell.innerHTML = 'No data';
|
911 |
justificationCell.innerHTML = 'Analysis failed';
|
|
|
906 |
scoreCell.style.fontWeight = 'bold';
|
907 |
scoreCell.style.textAlign = 'center';
|
908 |
}
|
909 |
+
// Add "Extract Insights" button to the justify cell - for Analyze All function
|
910 |
+
const insightsButton = document.createElement('button');
|
911 |
+
insightsButton.textContent = 'Extract Insights';
|
912 |
+
insightsButton.className = 'action-button insights-button';
|
913 |
+
insightsButton.style.marginTop = '5px';
|
914 |
+
insightsButton.style.fontSize = '0.8em';
|
915 |
+
insightsButton.onclick = function(e) {
|
916 |
+
e.preventDefault();
|
917 |
+
extractInsights(urlLink.href, row);
|
918 |
+
};
|
919 |
+
justificationCell.appendChild(document.createElement('br'));
|
920 |
+
justificationCell.appendChild(insightsButton);
|
921 |
} else {
|
922 |
scoreCell.innerHTML = 'No data';
|
923 |
justificationCell.innerHTML = 'Analysis failed';
|