source-code/
snakey-extension
Public
typescript21 lines623 B
import { StrictMode } from 'react'
import { createRoot } from 'react-dom/client'
import './index.css'
import App from './App.jsx'
// For Chrome Extension injection:
// Dynamically check if our custom extension root container exists.
// If it doesn't exist, create it and append it directly to document.body.
let rootContainer = document.getElementById('snakey-extension-root');
if (!rootContainer) {
rootContainer = document.createElement('div');
rootContainer.id = 'snakey-extension-root';
document.body.appendChild(rootContainer);
}
createRoot(rootContainer).render(
<StrictMode>
<App />
</StrictMode>,
)
About
Snakey Browser Extension is a cross-browser extension built using Manifest V3 that injects a playable Phaser 3 game onto any active tab. It parses the page DOM, turns HTML elements into target coordinates, and features custom chomp/collapse animations. It supports both Chromium (background service worker) and Firefox (background scripts), implements a Canvas-based rendering fallback to bypass strict WebGL CORS limitations, and applies fully container-scoped vanilla CSS overrides to prevent style bleeding on host pages.
linkrasis.me
Browser ExtensionChrome MV3Firefox MV3PhaserReactTypeScriptVite