Force a button state reset on update
This commit is contained in:
parent
e9131b6710
commit
fc400560e6
@ -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.
|
||||||
|
@ -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,
|
||||||
|
@ -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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user