Skip to content

Commit

Permalink
Fixes (#78)
Browse files Browse the repository at this point in the history
* Fix Error Catching so Upstream can Catch

* Update Options

* Add Comment
  • Loading branch information
smashedr authored Jun 22, 2024
1 parent 562ffd4 commit 6555e6b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/css/options.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* CSS for options.html */

.card {
body {
min-width: 340px;
}

Expand Down
3 changes: 2 additions & 1 deletion src/html/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ <h1>Link Extractor</h1>
</span>
</label>
</div>
<!-- <hr class="my-1 me-5">-->
<div class="form-check form-switch">
<input class="form-check-input form-control" type="checkbox" role="switch" id="contextMenu">
<label class="form-check-label" for="contextMenu" aria-describedby="contextMenuHelp">
Expand All @@ -119,7 +120,7 @@ <h1>Link Extractor</h1>
<div class="form-check form-switch">
<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
Show Update Release Notes
<span data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-title="Show Release Notes on Version Update.">
<i class="fa-solid fa-circle-info ms-1"></i>
</span>
Expand Down
12 changes: 4 additions & 8 deletions src/js/exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,10 @@ export async function injectTab({
// Inject extract.js which listens for messages
for (const tab of tabIds) {
console.debug(`injecting tab.id: ${tab}`)
try {
await chrome.scripting.executeScript({
target: { tabId: tab },
files: ['/js/extract.js'],
})
} catch (e) {
return console.info(e)
}
await chrome.scripting.executeScript({
target: { tabId: tab },
files: ['/js/extract.js'],
})
}

// Open Tab to links.html with desired params
Expand Down
3 changes: 2 additions & 1 deletion src/js/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ async function onInstalled(details) {
defaultFilter: true,
saveState: true,
linksTruncate: true,
linksNoWrap: true,
linksNoWrap: false,
contextMenu: true,
showUpdate: false,
})
Expand All @@ -75,6 +75,7 @@ async function onInstalled(details) {
uninstallURL.searchParams.append('version', manifest.version)
console.log('uninstallURL:', uninstallURL.href)
await chrome.runtime.setUninstallURL(uninstallURL.href)
// Check Permissions for Firefox Omnibox Usage
const hasPerms = await checkPerms()
if (hasPerms) {
await onAdded()
Expand Down

0 comments on commit 6555e6b

Please sign in to comment.