Skip to content

Commit

Permalink
Fix toggle by rm'ing listener after UI creation for #316
Browse files Browse the repository at this point in the history
  • Loading branch information
machawk1 committed Nov 2, 2023
1 parent c4d57c8 commit 871978f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mink-plugin/js/displayMinkUI.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ function appendHTMLToShadowDOM () {
appendCSSToShadowDOM(cb)
})
})
chrome.runtime.onMessage.removeListener(appendHTMLToShadowDOM)
}

// In some places, getting addZ has already been declared, thus var for now
Expand Down Expand Up @@ -825,7 +826,7 @@ function echoTMDataForMV3 (tmData) {
console.log(tmData)
}

if (document.getElementById('minkWrapper') == null) {
if (document.getElementById('minkWrapper') === null) {
chrome.runtime.onMessage.addListener(appendHTMLToShadowDOM)
} else {
$('#minkWrapper').toggle()
Expand Down

0 comments on commit 871978f

Please sign in to comment.