-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
29 lines (23 loc) · 884 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import * as fs from "fs";
const robloxVersionsPath = process.env["LOCALAPPDATA"] + "\\Roblox\\Versions";
if (!fs.existsSync(robloxVersionsPath)) {
throw "Seems like you don't have roblox installed!";
}
const readdirResult = fs.readdirSync(robloxVersionsPath);
for (let versionId of readdirResult) {
if (versionId == "RobloxStudioLauncherBeta.exe") continue; // not sure why this is here lol
const robloxPath = robloxVersionsPath + `\\${versionId}`;
if (fs.existsSync(robloxPath + "\\RobloxPlayerBeta.exe")) {
if (fs.existsSync(robloxPath + "\\ClientSettings")) continue;
fs.mkdirSync(robloxPath + "\\ClientSettings");
// Make file
fs.writeFile(
robloxPath + "\\ClientSettings\\ClientAppSettings.json",
"{\"FFlagHandleAltEnterFullscreenManually\":\"False\"}",
err => {
if (err) throw err;
console.log("Successfully enabled Alt+Enter!")
}
);
}
}