Skip to content

Commit

Permalink
Also rm ext detection el from DOM on CS teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
poltak committed Apr 9, 2024
1 parent 0bd4d53 commit bd23649
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion external/@worldbrain/memex-common
6 changes: 5 additions & 1 deletion src/content-scripts/content_script/global.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
import { EventEmitter } from 'events'
import type { ContentIdentifier } from '@worldbrain/memex-common/lib/page-indexing/types'
import { injectMemexExtDetectionEl } from '@worldbrain/memex-common/lib/common-ui/utils/content-script'
import {
injectMemexExtDetectionEl,
removeMemexExtDetectionEl,
} from '@worldbrain/memex-common/lib/common-ui/utils/content-script'
import {
MemexOpenLinkDetail,
MemexRequestHandledDetail,
Expand Down Expand Up @@ -1162,6 +1165,7 @@ export async function main(
})(window.getSelection(), shouldShare, shouldCopyLink),
removeHighlights: async () => highlightRenderer.resetHighlightsStyles(),
teardownContentScripts: async () => {
removeMemexExtDetectionEl()
await inPageUI.hideHighlights()
await inPageUI.hideSidebar()
await inPageUI.removeRibbon()
Expand Down

0 comments on commit bd23649

Please sign in to comment.