1 files changed, 16 insertions, 0 deletions
diff --git a/ReferenceClientProxyImplementation/Patches/Implementations/JSPatches/KnownConstantsPatch.cs b/ReferenceClientProxyImplementation/Patches/Implementations/JSPatches/KnownConstantsPatch.cs
new file mode 100644
index 0000000..a94e312
--- /dev/null
+++ b/ReferenceClientProxyImplementation/Patches/Implementations/JSPatches/KnownConstantsPatch.cs
@@ -0,0 +1,16 @@
+using System.Text;
+
+namespace ReferenceClientProxyImplementation.Patches.Implementations.JSPatches;
+
+public class KnownConstantsPatch : IPatch {
+ public int GetOrder() => 1;
+
+ public string GetName() => "Use named constants";
+ public bool Applies(string relativeName, byte[] content) => relativeName.EndsWith(".js");
+
+ public async Task<byte[]> Execute(string _, byte[] content) {
+ var stringContent = Encoding.UTF8.GetString(content);
+
+ return Encoding.UTF8.GetBytes(stringContent);
+ }
+}
\ No newline at end of file
|