add customvr.js

This commit is contained in:
Natsumi
2024-05-31 15:44:50 +12:00
parent 2742d6edb0
commit 5e8ecdb755
3 changed files with 32 additions and 1 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using CefSharp;
namespace VRCX
@@ -70,5 +71,18 @@ namespace VRCX
{
return CultureInfo.CurrentCulture.ToString();
}
/// <summary>
/// Returns the file path of the custom user js file, if it exists.
/// </summary>
/// <returns>The file path of the custom user js file, or an empty string if it doesn't exist.</returns>
public string CustomVrScriptPath()
{
var output = string.Empty;
var filePath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "VRCX\\customvr.js");
if (File.Exists(filePath))
output = filePath;
return output;
}
}
}