From e3c2f0272f9c379dd90fed5e8803911f07bb25fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABl=20M=C3=A9tais?= Date: Thu, 18 Sep 2014 15:50:43 +0200 Subject: [PATCH] Add DOM IDs duplicated to DOM Complexity notation --- app/node_views/results.html | 3 +++ app/public/scripts/resultsCtrl.js | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/node_views/results.html b/app/node_views/results.html index a7559ae..000d825 100644 --- a/app/node_views/results.html +++ b/app/node_views/results.html @@ -53,6 +53,9 @@
  • Number of iframes: {{phantomasResults.metrics.iframesCount}}
  • +
  • + IDs duplicated: {{phantomasResults.metrics.DOMidDuplicated}} +
  • diff --git a/app/public/scripts/resultsCtrl.js b/app/public/scripts/resultsCtrl.js index f6055c1..3816175 100644 --- a/app/public/scripts/resultsCtrl.js +++ b/app/public/scripts/resultsCtrl.js @@ -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'; }