From 176fa72e5fa10d0ce54ecaefc6fd76f85f8da2e3 Mon Sep 17 00:00:00 2001
From: Horo <34446199+Horocchi@users.noreply.github.com>
Date: Fri, 26 Mar 2021 03:53:45 -0700
Subject: [PATCH] Show successful match, fix text/button reset
Shows patches matched for full matches to help identify which version was uploaded (with accompanying green style).
Also, fixes force load text and buttons not hiding/clearing when uploading a matching file after a non-matching file without reloading the page.
---
css/style.css | 6 ++++++
js/dllpatcher.js | 12 ++++++++++++
2 files changed, 18 insertions(+)
diff --git a/css/style.css b/css/style.css
index fd711f3..4d7c548 100644
--- a/css/style.css
+++ b/css/style.css
@@ -209,6 +209,12 @@ button:hover:enabled, .fileLabel > strong:hover {
color: red;
}
+.matchSuccess {
+ font-size: 15px;
+ font-style: italic;
+ color: green;
+}
+
li > button {
height: 24px;
padding: 0 7px;
diff --git a/js/dllpatcher.js b/js/dllpatcher.js
index bc546c4..68ace25 100644
--- a/js/dllpatcher.js
+++ b/js/dllpatcher.js
@@ -211,6 +211,7 @@ class PatchContainer {
var supportedDlls = $("
");
this.forceLoadTexts = [];
this.forceLoadButtons = [];
+ this.matchSuccessText = [];
for (var i = 0; i < this.patchers.length; i++) {
var checkboxId = createID();
@@ -223,6 +224,9 @@ class PatchContainer {
var matchPercent = $('').addClass('matchPercent');
this.forceLoadTexts.push(matchPercent);
matchPercent.appendTo(listItem);
+ var matchSuccess = $('').addClass('matchSuccess');
+ this.matchSuccessText.push(matchSuccess);
+ matchSuccess.appendTo(listItem);
var forceButton = $('