Skip to content

Commit

Permalink
Merge pull request #164 from hmlendea/useragent
Browse files Browse the repository at this point in the history
Updated the user agents
  • Loading branch information
hmlendea committed Aug 27, 2022
2 parents c595c86 + 9ae1ee0 commit 75fb6be
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "geforcenow-electron",
"appId": "com.github.hmlendea.${name}",
"productName": "GeForce NOW",
"version": "1.8.0",
"version": "1.9.0",
"description": "A Linux desktop web app for GeForce NOW",
"main": "scripts/main.js",
"scripts": {
Expand Down
8 changes: 4 additions & 4 deletions scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ const { switchFullscreenState } = require('./windowManager.js');
var homePage = 'https://play.geforcenow.com';

var userAgent =
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.64 Safari/537.36'; // Linux
'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.101 Safari/537.36'; // Linux

if (process.argv.includes('--spoof-chromeos')) {
userAgent =
'Mozilla/5.0 (X11; CrOS x86_64 14588.98.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.59 Safari/537.36'; // ChromeOS
'Mozilla/5.0 (X11; CrOS x86_64 14909.100.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.5112.83 Safari/537.36'; // ChromeOS
app.commandLine.appendSwitch('disable-features', 'UserAgentClientHint');
}

if (process.argv.includes('--spoof-windows')) {
userAgent =
'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/99.0.4951.41 Safari/537.36'; // Windows
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36'; // Windows
app.commandLine.appendSwitch('disable-features', 'UserAgentClientHint');
}

Expand Down Expand Up @@ -150,4 +150,4 @@ var homePage = 'https://play.geforcenow.com';
if (process.platform !== 'darwin') {
app.quit();
}
});
});

0 comments on commit 75fb6be

Please sign in to comment.