Skip to content

Commit

Permalink
Minor Fixes (#46)
Browse files Browse the repository at this point in the history
* Fix Uninstall URL

* Remove Invalid on Update

* Fix flags Listener
  • Loading branch information
smashedr authored Dec 10, 2023
1 parent 4c219be commit 5ce4d85
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/html/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ <h1 class="align-middle">Link Extractor</h1>
Available Flags</a>.
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="contextMenu">
<input class="form-check-input form-control" type="checkbox" role="switch" id="contextMenu">
<label class="form-check-label" for="contextMenu" aria-describedby="contextMenuHelp">Enable Right Click Menu</label>
</div>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" role="switch" id="defaultFilter">
<input class="form-check-input form-control" type="checkbox" role="switch" id="defaultFilter">
<label class="form-check-label" for="defaultFilter" aria-describedby="defaultFilterHelp">
Use Default Link Filtering
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="currentColor" class="bi bi-info-circle-fill ms-1" viewBox="0 0 16 16" data-bs-toggle="tooltip"
Expand All @@ -61,7 +61,7 @@ <h1 class="align-middle">Link Extractor</h1>
</label>
</div>
<div class="form-check form-switch mb-3">
<input class="form-check-input" type="checkbox" role="switch" id="showUpdate">
<input class="form-check-input form-control" type="checkbox" role="switch" id="showUpdate">
<label class="form-check-label" for="showUpdate" aria-describedby="showUpdateHelp">Show Release Notes on Update</label>
</div>
</form>
Expand Down
3 changes: 2 additions & 1 deletion src/js/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ document
.addEventListener('submit', (e) => e.preventDefault())
document
.getElementById('flags')
.addEventListener('change', (e) => e.target.classList.remove('is-invalid'))
.addEventListener('input', (e) => e.target.classList.remove('is-invalid'))
document
.querySelectorAll('[data-bs-toggle="tooltip"]')
.forEach((el) => new bootstrap.Tooltip(el))
Expand Down Expand Up @@ -225,6 +225,7 @@ function updateOptions(options) {
} else if (typeof value === 'string') {
el.value = value
}
el.classList.remove('is-invalid')
}
}
}
3 changes: 2 additions & 1 deletion src/js/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ chrome.storage.onChanged.addListener(onChanged)
async function onInstalled(details) {
console.log('onInstalled:', details)
const githubURL = 'https://github.com/cssnr/link-extractor'
const uninstallURL = 'https://link-extractor.cssnr.com/uninstall/'
const [options, patterns] = await Promise.resolve(
setDefaultOptions({
flags: 'ig',
Expand All @@ -39,7 +40,7 @@ async function onInstalled(details) {
}
}
}
await chrome.runtime.setUninstallURL(`${githubURL}/issues`)
await chrome.runtime.setUninstallURL(uninstallURL)
}

/**
Expand Down

0 comments on commit 5ce4d85

Please sign in to comment.