Skip to content

Commit

Permalink
fix: skip content script injection when inactive
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Jun 17, 2018
1 parent 29d7bb1 commit 1d29ba9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions add-on/src/lib/ipfs-companion.js
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ module.exports = async function init () {
}

async function onUpdatedTab (tabId, changeInfo, tab) {
if (!state.active) return // skip content script injection when off
if (changeInfo.status && changeInfo.status === 'complete' && tab.url && tab.url.startsWith('http')) {
if (state.linkify) {
console.info(`[ipfs-companion] Running linkfyDOM for ${tab.url}`)
Expand Down

0 comments on commit 1d29ba9

Please sign in to comment.