Skip to content

Commit

Permalink
chore: singleton
Browse files Browse the repository at this point in the history
  • Loading branch information
a1mersnow committed Feb 6, 2024
1 parent 54138c8 commit 839043c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ import './styles/main.css'
import 'uno.css'

const ENTRY_ID = 'a1mersnow_webdrive_rename'
// @ts-expect-error pass
if (window[ENTRY_ID])
throw new Error('This error is expected! It means you have installed two copy of this script. Please remove one.')
// @ts-expect-error pass
window[ENTRY_ID] = true

const oldSetHeader = XMLHttpRequest.prototype.setRequestHeader

Expand Down

0 comments on commit 839043c

Please sign in to comment.