ml_vpc: added options to use cookies from browsers and enable/disable the mod completely

This commit is contained in:
kafeijao 2025-11-18 14:53:59 +00:00
parent da9dc508d0
commit 7ada4c4d86
No known key found for this signature in database
GPG key ID: E99978723E454B4C
7 changed files with 302 additions and 3 deletions

12
ml_vpc/Utils.cs Normal file
View file

@ -0,0 +1,12 @@
using ABI_RC.Core.UI;
using System.Reflection;
namespace ml_vpc
{
static class Utils
{
static readonly FieldInfo ms_view = typeof(CohtmlControlledViewWrapper).GetField("_view", BindingFlags.Instance | BindingFlags.NonPublic);
public static void ExecuteScript(this CohtmlControlledViewWrapper p_instance, string p_script) => (ms_view?.GetValue(p_instance) as cohtml.Net.View)?.ExecuteScript(p_script);
}
}