Add DOM IDs duplicated to DOM Complexity notation
This commit is contained in:
@@ -53,6 +53,9 @@
|
||||
<li ng-if="phantomasResults.metrics.iframesCount">
|
||||
Number of iframes: {{phantomasResults.metrics.iframesCount}}
|
||||
</li>
|
||||
<li ng-if="phantomasResults.metrics.DOMidDuplicated">
|
||||
IDs duplicated: {{phantomasResults.metrics.DOMidDuplicated}}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -156,7 +156,8 @@ app.controller('ResultsCtrl', function ($scope) {
|
||||
var note = 'A';
|
||||
var score = $scope.phantomasResults.metrics.DOMelementsCount +
|
||||
Math.pow($scope.phantomasResults.metrics.DOMelementMaxDepth, 2) +
|
||||
$scope.phantomasResults.metrics.iframesCount * 50;
|
||||
$scope.phantomasResults.metrics.iframesCount * 50 +
|
||||
$scope.phantomasResults.metrics.DOMidDuplicated * 25;
|
||||
if (score > 1000) {
|
||||
note = 'B';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user