From 8a9b630e68b04d9b1f0fcb049ada8d2353b93069 Mon Sep 17 00:00:00 2001 From: ConfusedPolarBear <33811686+ConfusedPolarBear@users.noreply.github.com> Date: Sat, 4 Mar 2023 00:15:26 -0600 Subject: [PATCH] Make credit skipping functionality available --- .../Configuration/PluginConfiguration.cs | 9 ++- .../UserInterfaceConfiguration.cs | 17 ++++-- .../Configuration/configPage.html | 18 +++++- .../Configuration/inject.js | 55 ++++++++++++++----- .../Controllers/SkipIntroController.cs | 46 +++++++++++++--- 5 files changed, 111 insertions(+), 34 deletions(-) diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs index 6944832..d94269e 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/PluginConfiguration.cs @@ -163,9 +163,14 @@ public PluginConfiguration() // ===== Localization support ===== /// - /// Gets or sets the text to display in the Skip Intro button. + /// Gets or sets the text to display in the skip button in introduction mode. /// - public string SkipButtonText { get; set; } = "Skip Intro"; + public string SkipButtonIntroText { get; set; } = "Skip Intro"; + + /// + /// Gets or sets the text to display in the skip button in end credits mode. + /// + public string SkipButtonEndCreditsText { get; set; } = "Next"; /// /// Gets or sets the notification text sent after automatically skipping an introduction. diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/UserInterfaceConfiguration.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/UserInterfaceConfiguration.cs index a5a2028..05ee453 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/UserInterfaceConfiguration.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/UserInterfaceConfiguration.cs @@ -9,11 +9,13 @@ public class UserInterfaceConfiguration /// Initializes a new instance of the class. /// /// Skip button visibility. - /// Skip button text. - public UserInterfaceConfiguration(bool visible, string text) + /// Skip button intro text. + /// Skip button end credits text. + public UserInterfaceConfiguration(bool visible, string introText, string creditsText) { SkipButtonVisible = visible; - SkipButtonText = text; + SkipButtonIntroText = introText; + SkipButtonEndCreditsText = creditsText; } /// @@ -22,7 +24,12 @@ public UserInterfaceConfiguration(bool visible, string text) public bool SkipButtonVisible { get; set; } /// - /// Gets or sets the text to display in the skip intro button. + /// Gets or sets the text to display in the skip intro button in introduction mode. /// - public string SkipButtonText { get; set; } + public string SkipButtonIntroText { get; set; } + + /// + /// Gets or sets the text to display in the skip intro button in end credits mode. + /// + public string SkipButtonEndCreditsText { get; set; } } diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html index a41f043..403ebd3 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Configuration/configPage.html @@ -265,15 +265,25 @@ User Interface Customization
-
+
+ + +
+ Text to display in the skip end credits button. +
+
+