Skip to content

Commit

Permalink
Reduce minimum search length
Browse files Browse the repository at this point in the history
  • Loading branch information
forgetso committed Sep 5, 2023
1 parent 64cf162 commit 60bb13f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion assets/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@

</div>

<div class="text-center">Version 1.6.6</div>
<div class="text-center">Version 1.6.7</div>
</body>

</html>
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"https://*/*"
],
"update_url": "http://clients2.google.com/service/update2/crx",
"version": "1.6.6",
"version": "1.6.7",
"options_page": "assets/options.html"
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "search_and_replace",
"version": "1.6.6",
"version": "1.6.7",
"resolutions": {
"author": "Chris Taylor <[email protected]>"
},
Expand Down
5 changes: 2 additions & 3 deletions src/popup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@ const INPUT_ELEMENTS_AND_EVENTS = {
}

const CHECKBOXES: SearchReplaceCheckboxNames[] = Object.values(SearchReplaceCheckboxNames)
const MIN_SEARCH_TERM_LENGTH = 2
const lastTimeTermsStored = 0
const MIN_SEARCH_TERM_LENGTH = 1
window.addEventListener('DOMContentLoaded', function () {
// Create a variable for storing the time since last time terms were stored

Expand Down Expand Up @@ -232,7 +231,7 @@ async function storeTerms(e, save?: boolean) {
const searchReplaceInput = getInputValues(false)
const history = constructSearchReplaceHistory()

if (searchReplaceInput.searchTerm.length > MIN_SEARCH_TERM_LENGTH) {
if (searchReplaceInput.searchTerm.length >= MIN_SEARCH_TERM_LENGTH) {
// This does the actual search replace
const url = await tabQuery('store', searchReplaceInput, history, tabQueryCallback)
// This sends the search replace terms to the background page and stores them
Expand Down

0 comments on commit 60bb13f

Please sign in to comment.