Skip to content

Commit 47728aa

Browse files
Communicate with Gitpod instances (#92)
1 parent 4d05d61 commit 47728aa

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/contents/gitpod-dashboard.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import type { PlasmoCSConfig } from "plasmo";
2+
3+
/**
4+
* Checks if the current site is a Gitpod instance.
5+
*/
6+
const isSiteGitpod = (): boolean => {
7+
return !!document.head.querySelector("meta[name=Gitpod]");
8+
}
9+
10+
export const config: PlasmoCSConfig = {
11+
matches: ["https://*/*"]
12+
}
13+
14+
if (isSiteGitpod()) {
15+
sessionStorage.setItem("browser-extension-installed", "true");
16+
}

0 commit comments

Comments
 (0)