diff options
author | 0neGal <mail@0negal.com> | 2023-01-15 22:16:33 +0100 |
---|---|---|
committer | 0neGal <mail@0negal.com> | 2023-01-15 22:20:40 +0100 |
commit | 6c34ee014aecb9248d519bae0ab64aebab5b3e31 (patch) | |
tree | 0ba5c59bc137e62c4c70c8eea2b020008f22fa5b /src/index.js | |
parent | 290b2c06f7f13d185669cd8b1910e294a134b5be (diff) | |
download | Viper-6c34ee014aecb9248d519bae0ab64aebab5b3e31.tar.gz Viper-6c34ee014aecb9248d519bae0ab64aebab5b3e31.zip |
use custom user-agent for masterserver requests
Diffstat (limited to 'src/index.js')
-rw-r--r-- | src/index.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/index.js b/src/index.js index 16eebfe..638bebb 100644 --- a/src/index.js +++ b/src/index.js @@ -8,6 +8,7 @@ process.chdir(app.getPath("appData")); const utils = require("./utils"); const cli = require("./cli"); +const json = require("./modules/json"); const mods = require("./modules/mods"); const settings = require("./modules/settings"); const requests = require("./modules/requests"); @@ -30,6 +31,8 @@ function start() { // as it's fairly responsive, but for now we won't allow that. resizable: false, + userAgent: "test", + frame: false, titleBarStyle: "hidden", icon: path.join(__dirname, "assets/icons/512x512.png"), @@ -45,7 +48,9 @@ function start() { // general setup win.removeMenu(); - win.loadFile(__dirname + "/app/index.html"); + win.loadURL("file://" + __dirname + "/app/index.html", { + userAgent: "viper/" + json(path.join(__dirname, "../package.json")).version, + }); win.send = (channel, data) => { win.webContents.send(channel, data); |