1 import { SupportedBrowserValue } from './interface';
4 // The tag that we're interested in is the main script file. Normally that's index.js.
5 document.querySelector<HTMLScriptElement>('script[src*="/index"]') ||
6 // but there's also lite, eo, private, and public script files. So we suffix them with -index.
7 document.querySelector<HTMLScriptElement>('script[src*="-index"]');
10 scriptNode.onerror = () => {
11 window.protonSupportedBrowser = SupportedBrowserValue.Other;
13 scriptNode.onload = () => {
14 if (window.protonSupportedBrowser === undefined) {
15 window.protonSupportedBrowser = SupportedBrowserValue.Unsupported;