Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
smashedr committed Aug 28, 2024
1 parent c39c357 commit 7867b3c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/html/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<div class="container-fluid p-2">
<div class="d-flex flex-row align-items-center">
<div class="dropdown">
<a id="bd-theme-disabled" class="nav-link hvr-grow" title="Theme Switcher" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<a id="bd-theme-disabled" class="nav-link" title="Theme Switcher" role="button" data-bs-toggle="dropdown" aria-expanded="false">
<i id="theme-icon" class="fa-solid fa-circle-half-stroke fa-lg" style="min-width: 20px;"></i>
<i class="fa-solid fa-caret-down fa-xs mx-1"></i>
</a>
Expand Down
2 changes: 1 addition & 1 deletion src/js/exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export async function saveOptions(event) {
}
if (value !== undefined) {
options[key] = value
console.log(`Set: ${key}:`, value)
console.log(`Set %c${key}:`, 'color: Khaki', value)
await chrome.storage.sync.set({ options })
}
}
Expand Down
12 changes: 6 additions & 6 deletions src/js/service-worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import { checkPerms, injectTab, githubURL } from './exports.js'

chrome.runtime.onStartup.addListener(onStartup)
chrome.runtime.onInstalled.addListener(onInstalled)
chrome.runtime.onStartup.addListener(onStartup)
chrome.contextMenus?.onClicked.addListener(onClicked)
chrome.commands?.onCommand.addListener(onCommand)
chrome.storage.onChanged.addListener(onChanged)
Expand Down Expand Up @@ -219,7 +219,7 @@ async function onInputEntered(text) {
*/
export async function onAdded(permissions) {
console.debug('onAdded:', permissions)
chrome.omnibox.setDefaultSuggestion({
chrome.omnibox?.setDefaultSuggestion({
description: 'Link Extractor - Extract All Links or Type in a Filter',
})
}
Expand All @@ -232,7 +232,7 @@ export async function onRemoved(permissions) {
console.debug('onRemoved:', permissions)
// noinspection JSUnresolvedReference
if (typeof browser !== 'undefined') {
chrome.omnibox.setDefaultSuggestion({
chrome.omnibox?.setDefaultSuggestion({
description:
'Link Extractor - Omnibox Requires Host Permissions. See Popup/Options.',
})
Expand Down Expand Up @@ -317,12 +317,12 @@ function copyActiveElementText(ctx) {
document.activeElement.title?.trim() ||
document.activeElement.firstElementChild?.alt?.trim() ||
document.activeElement.ariaLabel?.trim()
console.log(`text: "${text}"`)
console.log('text:', text)
if (text?.length) {
// noinspection JSIgnoredPromiseFromCall
navigator.clipboard.writeText(text)
} else {
console.info('No Text to Copy.')
console.log('No Text to Copy.', 'color: Yellow')
}
}

Expand Down Expand Up @@ -397,7 +397,7 @@ async function setDefaultOptions(defaultOptions) {
if (options[key] === undefined) {
changed = true
options[key] = value
console.log(`Set ${key}:`, value)
console.log(`Set %c${key}:`, 'color: Khaki', value)
}
}
if (changed) {
Expand Down

0 comments on commit 7867b3c

Please sign in to comment.