summaryrefslogtreecommitdiff
path: root/src/SMAPI.Web/wwwroot
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-12-04 20:52:40 -0500
committerJesse Plamondon-Willard <Pathoschild@users.noreply.github.com>2019-12-04 20:52:40 -0500
commit9465628effad6bdb1994599031a8f60c3af2452e (patch)
tree77276d3d3a4f29f8799189b52e9d98e0763b469c /src/SMAPI.Web/wwwroot
parent8ddb60cee636cc17291100c316df4786eb3bb448 (diff)
downloadSMAPI-9465628effad6bdb1994599031a8f60c3af2452e.tar.gz
SMAPI-9465628effad6bdb1994599031a8f60c3af2452e.tar.bz2
SMAPI-9465628effad6bdb1994599031a8f60c3af2452e.zip
fix JSON validator format selector no longer working since URL changes
Diffstat (limited to 'src/SMAPI.Web/wwwroot')
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/json-validator.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/SMAPI.Web/wwwroot/Content/js/json-validator.js b/src/SMAPI.Web/wwwroot/Content/js/json-validator.js
index 76b5f6d4..401efbee 100644
--- a/src/SMAPI.Web/wwwroot/Content/js/json-validator.js
+++ b/src/SMAPI.Web/wwwroot/Content/js/json-validator.js
@@ -70,10 +70,10 @@ smapi.LineNumberRange = function (maxLines) {
/**
* UI logic for the JSON validator page.
- * @param {any} sectionUrl The base JSON validator page URL.
- * @param {any} pasteID The Pastebin paste ID for the content being viewed, if any.
+ * @param {string} urlFormat The URL format for a file, with $schemaName and $id placeholders.
+ * @param {string} pasteID The Pastebin paste ID for the content being viewed, if any.
*/
-smapi.jsonValidator = function (sectionUrl, pasteID) {
+smapi.jsonValidator = function (urlFormat, pasteID) {
/**
* The original content element.
*/
@@ -138,7 +138,7 @@ smapi.jsonValidator = function (sectionUrl, pasteID) {
// change format
$("#output #format").on("change", function() {
var schemaName = $(this).val();
- location.href = new URL(schemaName + "/" + pasteID, sectionUrl).toString();
+ location.href = urlFormat.replace("$schemaName", schemaName).replace("$id", pasteID);
});
// upload form