Skip to content

Commit

Permalink
Communicate with Gitpod instances (#92)
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptronicek authored Sep 27, 2023
1 parent 4d05d61 commit 47728aa
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/contents/gitpod-dashboard.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { PlasmoCSConfig } from "plasmo";

/**
* Checks if the current site is a Gitpod instance.
*/
const isSiteGitpod = (): boolean => {
return !!document.head.querySelector("meta[name=Gitpod]");
}

export const config: PlasmoCSConfig = {
matches: ["https://*/*"]
}

if (isSiteGitpod()) {
sessionStorage.setItem("browser-extension-installed", "true");
}

0 comments on commit 47728aa

Please sign in to comment.