Force a button state reset on update

This commit is contained in:
TwistedUmbrellaX 2024-10-27 05:08:22 -04:00
parent e9131b6710
commit fc400560e6
3 changed files with 3 additions and 3 deletions

View File

@ -144,7 +144,7 @@ public class PluginConfiguration : BasePluginConfiguration
/// <summary> /// <summary>
/// Gets or sets a value indicating whether to show the skip intro button. /// Gets or sets a value indicating whether to show the skip intro button.
/// </summary> /// </summary>
public bool SkipButtonVisible { get; set; } = false; public bool SkipButtonEnabled { get; set; } = false;
/// <summary> /// <summary>
/// Gets a value indicating whether to show the skip intro warning. /// Gets a value indicating whether to show the skip intro warning.

View File

@ -234,7 +234,7 @@ public class SkipIntroController : ControllerBase
{ {
var config = Plugin.Instance!.Configuration; var config = Plugin.Instance!.Configuration;
return new UserInterfaceConfiguration( return new UserInterfaceConfiguration(
config.SkipButtonVisible, config.SkipButtonEnabled,
config.SkipButtonIntroText, config.SkipButtonIntroText,
config.SkipButtonEndCreditsText, config.SkipButtonEndCreditsText,
config.AutoSkip, config.AutoSkip,

View File

@ -562,7 +562,7 @@ public class Plugin : BasePlugin<PluginConfiguration>, IHasWebPages
_logger.LogDebug("Reading index.html from {Path}", indexPath); _logger.LogDebug("Reading index.html from {Path}", indexPath);
string contents = File.ReadAllText(indexPath); string contents = File.ReadAllText(indexPath);
if (!Instance!.Configuration.SkipButtonVisible) if (!Instance!.Configuration.SkipButtonEnabled)
{ {
pattern = @"<script src=""configurationpage\?name=skip-intro-button\.js.*<\/script>"; pattern = @"<script src=""configurationpage\?name=skip-intro-button\.js.*<\/script>";
contents = Regex.Replace(contents, pattern, string.Empty, RegexOptions.IgnoreCase); contents = Regex.Replace(contents, pattern, string.Empty, RegexOptions.IgnoreCase);