Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Commit 1000eb2

Browse files
committed
fix: Adding debug on debug loading
1 parent 9eac052 commit 1000eb2

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

src/core/startDevTool/index.ts

-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ function startDevTool() {
88

99
shakeDetector.subscribe(() => {
1010
const target = prompt('Input your target replacement source url or leave it blank if no replacement wanted')
11-
12-
alert(`Source Replacement Starting with ${target}`)
1311

1412
sessionStorage.setItem(REPLACEMENT_SOURCE_KEY, target!)
1513

src/utils/placeLoadingPlaceholder/index.test.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ describe('placeLoadingPlaceholder', () => {
66
it('should write loading source to target page', async () => {
77
const { default: placeLoadingPlaceholder } = await import('.')
88

9-
placeLoadingPlaceholder()
9+
placeLoadingPlaceholder('http://example.com')
1010

11-
expect(writeSourceToTargetPageSpy).toBeCalledWith('<html><body>LMWN Debugger Replacing In Progress...</body></html>')
11+
expect(writeSourceToTargetPageSpy).toBeCalledWith('<html><body><h1>LMWN Debugger Replacing In Progress...</h1><h2>Target Replacement is http://example.com</h2></body></html>')
1212
})
1313
})

src/utils/placeLoadingPlaceholder/index.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import writeSourceToTargetPage from 'utils/writeSourceToTargetPage'
22

3-
function placeLoadingPlaceholder() {
4-
const LOADING_PLACEHOLDER = '<html><body>LMWN Debugger Replacing In Progress...</body></html>'
3+
function placeLoadingPlaceholder(target: string) {
4+
const LOADING_PLACEHOLDER = `<html><body><h1>LMWN Debugger Replacing In Progress...</h1><h2>Target Replacement is ${target}</h2></body></html>`
55

66
writeSourceToTargetPage(LOADING_PLACEHOLDER)
77
}

0 commit comments

Comments
 (0)