diff --git a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs index 8ff597a..6ce01a2 100644 --- a/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs +++ b/ConfusedPolarBear.Plugin.IntroSkipper/Plugin.cs @@ -85,7 +85,7 @@ public class Plugin : BasePlugin, IHasWebPages var indexPath = Path.Join(applicationPaths.WebPath, "index.html"); try { - InjectSkipButton(indexPath, Path.Join(introsDirectory, "index-pre-skip-button.html")); + InjectSkipButton(indexPath); } catch (Exception ex) { @@ -328,8 +328,7 @@ public class Plugin : BasePlugin, IHasWebPages /// Inject the skip button script into the web interface. /// /// Full path to index.html. - /// Full path to create a backup of index.html at. - private void InjectSkipButton(string indexPath, string backupPath) + private void InjectSkipButton(string indexPath) { // Parts of this code are based off of JellyScrub's script injection code. // https://github.com/nicknsy/jellyscrub/blob/4ce806f602988a662cfe3cdbaac35ee8046b7ec4/Nick.Plugin.Jellyscrub/JellyscrubPlugin.cs @@ -349,10 +348,6 @@ public class Plugin : BasePlugin, IHasWebPages return; } - // Backup the original version of the web interface - _logger.LogInformation("Backing up index.html to {Backup}", backupPath); - File.WriteAllText(backupPath, contents); - // Inject a link to the script at the end of the section. // A regex is used here to ensure the replacement is only done once. _logger.LogDebug("Injecting script tag");