From 5b02f2494d87ea5b6610ce32bf049c95b864254a Mon Sep 17 00:00:00 2001 From: YourFriendlyNeighborhoodDealer Date: Mon, 18 Mar 2019 17:27:04 +0100 Subject: [PATCH] Removed unused function --- main.js | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/main.js b/main.js index d87b1ac..48df8d4 100644 --- a/main.js +++ b/main.js @@ -1553,23 +1553,6 @@ function AddVideoHotkeys(url) { node.style.margin = "5px 5px 5px 5px"; // fancy margin } -function GetMatchPercent(currData, questionParts) { - var currQuestion = SUtils.SimplifyQuery(currData.q); // current question simplified - var match = 0; // how many times the current question matches the current question in the database - for (var i = 0; i < questionParts.length; i++) // going through the question parts - { - if (currQuestion.includes(questionParts[i])) // if the current question from questionData includes one of the question parts - { - match++; - } - } - var percent = Math.round(((match / questionParts.length) * 100).toFixed(2)); // matched words percent - var lengthDifference = RemoveMultipleItems(SUtils.SimplifyQuery(currQuestion).split(" ")).length - - questionParts.length; - percent -= Math.abs(lengthDifference) * 2; - return percent; -} - // simple sort. function SortByPercent(results) { for (var i = 0; i < results.length; i++) {