File tree 1 file changed +7
-6
lines changed
src/frontend/screens/WebView
1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,13 @@ export default function WebView() {
151
151
if ( webview ) {
152
152
const loadstop = async ( ) => {
153
153
setLoading ( { ...loading , refresh : false } )
154
+ const userAgent =
155
+ startUrl === epicLoginUrl
156
+ ? 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) EpicGamesLauncher'
157
+ : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/200.0'
158
+ if ( webview . getUserAgent ( ) != userAgent ) {
159
+ webview . setUserAgent ( userAgent )
160
+ }
154
161
// Ignore the login handling if not on login page
155
162
if ( ! runner ) {
156
163
return
@@ -292,11 +299,6 @@ export default function WebView() {
292
299
setShowLoginWarningFor ( null )
293
300
}
294
301
295
- const userAgent =
296
- startUrl === epicLoginUrl
297
- ? 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) EpicGamesLauncher'
298
- : 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) Chrome/200.0 HeroicGamesLauncher'
299
-
300
302
return (
301
303
< div className = "WebView" >
302
304
{ webviewRef . current && (
@@ -313,7 +315,6 @@ export default function WebView() {
313
315
partition = "persist:epicstore"
314
316
src = { startUrl }
315
317
allowpopups = { trueAsStr }
316
- useragent = { userAgent }
317
318
/>
318
319
{ showLoginWarningFor && (
319
320
< LoginWarning
You can’t perform that action at this time.
0 commit comments