From 42934ffaf9a8976439f1f1ce5ef9ae52e0318c82 Mon Sep 17 00:00:00 2001
From: Skriv <skrivelese@gmail.com>
Date: Sat, 30 Mar 2019 12:47:22 +0100
Subject: [PATCH] revert colorinput

---
 src/js/colorinput.js | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/js/colorinput.js b/src/js/colorinput.js
index ebe17cdc8d3..4aa2438276d 100644
--- a/src/js/colorinput.js
+++ b/src/js/colorinput.js
@@ -2,11 +2,11 @@ Macro.add("colorinput", {
 	handler: function() {
 		if (this.args.length < 2) {
 			var e = [];
-			return this.args.length < 1 && e.push("variable name"), this.args.length < 2 && e.push("default value"), this.error(`no ${ e.join(" or ") } specified`);
+			return this.args.length < 1 && e.push("variable name"), this.args.length < 2 && e.push("default value"), this.error("no " + e.join(" or ") + " specified");
 		}
 		if ("string" != typeof this.args[0]) return this.error("variable name argument is not a string");
 		var varName = this.args[0].trim();
-		if ("$" !== varName[0] && "_" !== varName[0]) return this.error(`variable name "${ this.args[0] }" is missing its sigil ($ or _)`);
+		if ("$" !== varName[0] && "_" !== varName[0]) return this.error('variable name "' + this.args[0] + '" is missing its sigil ($ or _)');
 		Config.debug && this.debugView.modes({
 			block: true
 		});
@@ -36,18 +36,18 @@ Macro.add("colorinput", {
 				}
 				Engine.play(passage);
 				if (currentPassage == passage) {
-					Scripting.evalJavaScript(`window.scrollTo(0, ${ currentScrollPosition });`);
+					Scripting.evalJavaScript("window.scrollTo(0, " + currentScrollPosition + ");");
 				}
 			}
 		}
 
 		jQuery(inputElement).attr({
-			id: `${this.name }-${ r}`,
-			name: `${this.name }-${ r}`,
+			id: this.name + "-" + r,
+			name: this.name + "-" + r,
 			type: 'color',
 			value: value,
 			tabindex: 0
-		}).addClass(`macro-${ this.name}`)
+		}).addClass("macro-" + this.name)
 			.on("change", function() {
 				State.setVar(varName, this.value);
 				if (this.value != value) { // If the value has actually changed, reload the page.  Note != and not !== because types might be different
-- 
GitLab