Skip to content

Commit db5da4e

Browse files
committed
hide scan background image on click
1 parent eff9d44 commit db5da4e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/content.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ function showGrayLayout() {
4141
document.body.appendChild(grayLayout);
4242
const scan = document.createElement("div");
4343
scan.className = "scan";
44+
scan.id = "__ga_scan__";
4445
scan.style.background = `url('${scanGIF}') no-repeat center`;
4546
grayLayout.appendChild(scan);
4647
const captureBox = document.createElement("div");
@@ -76,6 +77,11 @@ function grayLayoutDown(event: MouseEvent) {
7677
captureBox.style.width = "1px";
7778
captureBox.style.height = "1px";
7879
captureBox.style.display = "block";
80+
81+
const scan = document.getElementById("__ga_scan__");
82+
if (scan) {
83+
scan.style.background = "transparent";
84+
}
7985
return;
8086
}
8187

0 commit comments

Comments
 (0)