Skip to content

Commit 96dec23

Browse files
committed
Change default threshold
1 parent 50a6443 commit 96dec23

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ It is recommended to pin the extension to the toolbar to check if a new modified
5050
To modify the similarity threshold using the options page of the extension, follow these steps:
5151
1. Click on the debugHunter extension icon in the Chrome toolbar.
5252
2. Click on the gear icon in the top right corner of the popup to open the options page.
53-
3. In the options page, use the slider to set the similarity threshold to the desired value (default 0.97)
53+
3. In the options page, use the slider to set the similarity threshold to the desired value (default 0.92)
5454

5555
## Contributing
5656

background.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ async function binarySearch(url, includedParams, searchParams, originalText) {
130130
chrome.storage.sync.get('similarityThreshold', resolve);
131131
});
132132

133-
const similarityThreshold = storedSettings.similarityThreshold || 0.97;
133+
const similarityThreshold = storedSettings.similarityThreshold || 0.92;
134134

135135
if (isDifferentResponse(originalText, modifiedText, similarityThreshold)) {
136136
addModifiedUrl(modifiedUrl);
@@ -155,7 +155,7 @@ async function binarySearch(url, includedParams, searchParams, originalText) {
155155
chrome.storage.sync.get('similarityThreshold', resolve);
156156
});
157157

158-
const similarityThreshold = storedSettings.similarityThreshold || 0.97;
158+
const similarityThreshold = storedSettings.similarityThreshold || 0.92;
159159

160160
if (isDifferentResponse(originalText, modifiedText, similarityThreshold)) {
161161
// If the response is different, add the modified URL and search for more modifications

options.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
<body>
4343
<h1>Options</h1>
4444
<label for="similarityThreshold">Similarity Threshold</label>
45-
<input type="range" id="similarityThreshold" name="similarityThreshold" min="0" max="1" step="0.01" value="0.97">
46-
<p>Current value: <span id="similarityThresholdValue">0.97</span></p>
45+
<input type="range" id="similarityThreshold" name="similarityThreshold" min="0" max="1" step="0.01" value="0.92">
46+
<p>Current value: <span id="similarityThresholdValue">0.92</span></p>
4747
<br><br><p>The similarity threshold determines the minimum similarity score required for a pair of URLs to be considered the same. The value ranges from 0 to 1, where 0 means that any pair of URLs is considered the same, and 1 means that only identical URLs are considered the same. The closer the value is to 1, the more similar the URLs need to be to be considered the same.</p>
48-
<p><b>Default value is: 0.97</b></p>
48+
<p><b>Default value is: 0.92</b></p>
4949
<script src="options.js"></script>
5050
</body>
5151
</html>

options.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ document.addEventListener('DOMContentLoaded', () => {
1010

1111
// Load the saved similarity threshold value
1212
chrome.storage.sync.get('similarityThreshold', (data) => {
13-
const value = data.similarityThreshold || 0.97;
13+
const value = data.similarityThreshold || 0.92;
1414
similarityThresholdSlider.value = value;
1515
updateDisplayValue(value);
1616
});

0 commit comments

Comments
 (0)