Skip to content

Commit

Permalink
Fix Domains and Links (#97)
Browse files Browse the repository at this point in the history
  • Loading branch information
smashedr authored Aug 16, 2024
1 parent 40e894e commit a5bce7a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/js/links.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ async function processLinks(links) {

function windowResize() {
// console.debug('windowResize')
linksTable.columns.adjust().draw()
domainsTable.columns.adjust().draw()
linksTable?.columns.adjust().draw()
domainsTable?.columns.adjust().draw()
}

function dtDraw(event) {
Expand Down
8 changes: 5 additions & 3 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,14 +198,16 @@ async function popupLinks(event) {
*/
async function filterForm(event) {
console.debug('filterForm:', event)
const target = event.currentTarget
console.debug('target:', target)
event.preventDefault()
let filter
if (event.target.classList.contains('dropdown-item')) {
filter = event.target.dataset.pattern
if (target.classList.contains('dropdown-item')) {
filter = target.dataset.pattern
} else if (filterInput?.value) {
filter = filterInput.value
}
const domains = event.target.dataset.filter === 'domains'
const domains = target.dataset.filter === 'domains'
try {
await injectTab({ filter, domains })
window.close()
Expand Down

0 comments on commit a5bce7a

Please sign in to comment.