Replit Webview detector

A very small and lightweight library for detecting the Replit Webview and fullscreen modes.

Try it

In the current window

Is in Webview:

Is in fullscreen:

In an iFrame

In the Replit Webview

Webview screenshot

In the Replit Run View

Run View screenshot

How to use

Include the following script in your page:

<!-- load the Webview detector library -->
<script src="https://replit-webview-detector.pages.dev/webview-detector.js"></script>

Then, to detect if you're inside the Webview in the Replit workspace, use the following:

const detector = new ReplitWebviewDetector();

// detect Replit Webview
detector.isWebview();

If you want to detect fullscreen, use the following:

// detect fullscreen mode
detector.isFullScreen();

Fullscreen is when the page is opened in it's own tab, and is the topmost window.