diff --git a/app/webroot/js/decayingToolBasescore.js b/app/webroot/js/decayingToolBasescore.js index ec06be83a..a570d6676 100644 --- a/app/webroot/js/decayingToolBasescore.js +++ b/app/webroot/js/decayingToolBasescore.js @@ -17,8 +17,8 @@ function addTagWithValue(clicked) { function addPickedTags(clicked) { var numerical_values = []; - $select = $('#basescore-example-tag-picker'); - $previous_tags = $('#basescore-example-customtag-container span.decayingExampleTags'); + var $select = $('#basescore-example-tag-picker'); + var $previous_tags = $('#basescore-example-customtag-container span.decayingExampleTags'); $previous_tags.each(function() { numerical_values.push({name: $(this).text().split(':')[0], value: parseInt($(this).data('numerical_value'))}); }); @@ -43,7 +43,7 @@ function removeCustomTag(clicked) { $(clicked).parent().tooltip('destroy'); $(clicked).add($(clicked).prev()).remove(); var numerical_values = []; - $previous_tags = $('#basescore-example-customtag-container span.decayingExampleTags'); + var $previous_tags = $('#basescore-example-customtag-container span.decayingExampleTags'); $previous_tags.each(function() { numerical_values.push({name: $(this).text().split(':')[0], value: parseInt($(this).data('numerical_value'))}); }); @@ -210,8 +210,8 @@ function genHelpBaseScoreComputation(e, index) { function refreshExamples() { for (var i = 1; i <= 3; i++) { var numerical_values = []; - tags = pickRandomTags(); - tags_html = '
'; + var tags = pickRandomTags(); + var tags_html = '
'; tags.forEach(function(tag) { numerical_values.push({name: tag.name.split(':')[0], value: tag['numerical_value']}); var text_color = getTextColour(tag.colour); diff --git a/app/webroot/js/misp.js b/app/webroot/js/misp.js index cbc6a9b75..d154bff51 100644 --- a/app/webroot/js/misp.js +++ b/app/webroot/js/misp.js @@ -4286,18 +4286,18 @@ function jsonToNestedTable(json, header, table_classes) { } header = header === undefined ? [] : header; table_classes = table_classes === undefined ? [] : table_classes; - $table = $('
'); + var $table = $('
'); table_classes.forEach(function(classname) { $table.addClass(classname); }); if (header.length > 0) { - $header = $(''); + var $header = $(''); header.forEach(function(col) { $header.child().append($('' + col + '')); }); $table.append($header); } - $body = $(''); + var $body = $(''); Object.keys(json).forEach(function(k) { var value = json[k]; if (typeof value === 'object') {