Skip to content

Commit

Permalink
Fix Link Parsing 2 (#72)
Browse files Browse the repository at this point in the history
  • Loading branch information
smashedr authored May 14, 2024
1 parent af63048 commit 2efe907
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/js/popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ async function linksForm(event) {
})
} else if (event.submitter.id === 'open-text') {
let text = value.split(/\s+/).filter((s) => s !== '')
// console.debug('text:', text)
console.debug('text:', text)
text.forEach(function (url) {
if (!url.includes('://')) {
// links without a : get prepended the web extension url by default
if (!url.includes(':')) {
url = `http://${url}`
}
// console.debug('url:', url)
chrome.tabs.create({ active: false, url })
})
} else {
Expand Down

0 comments on commit 2efe907

Please sign in to comment.