mirror of
				https://gitlab.com/MrFry/moodle-test-userscript
				synced 2025-04-01 20:22:48 +02:00 
			
		
		
		
	Removed unused function
This commit is contained in:
		
							
								
								
									
										17
									
								
								main.js
									
									
									
									
									
								
							
							
						
						
									
										17
									
								
								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++) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user