diff --git a/app/public/static/package_edit.js b/app/public/static/package_edit.js
index 481e774..b997b83 100644
--- a/app/public/static/package_edit.js
+++ b/app/public/static/package_edit.js
@@ -22,6 +22,38 @@ $(function() {
}
});
+ let hint = null;
+ function showHint(ele, text) {
+ if (hint) {
+ hint.remove();
+ }
+
+ hint = ele.parent()
+ .append(`
${text}
`)
+ .find(".alert");
+ }
+
+ let hint_mtmods = `Tip:
+ Don't include Minetest, mod, or modpack anywhere in the short description.
+ It is unnecessary and wastes characters.`;
+
+ let hint_thegame = `Tip:
+ It's obvious that this adds something to Minetest,
+ there's no need to use phrases such as \"adds X to the game\".`
+
+ $("#shortDesc").on("change paste keyup", function() {
+ var val = $(this).val().toLowerCase();
+ if (val.indexOf("minetest") >= 0 || val.indexOf("mod") >= 0 ||
+ val.indexOf("modpack") >= 0 || val.indexOf("mod pack") >= 0) {
+ showHint($(this), hint_mtmods);
+ } else if (val.indexOf("the game") >= 0) {
+ showHint($(this), hint_thegame);
+ } else if (hint) {
+ hint.remove();
+ hint = null;
+ }
+ })
+
var btn = $("#forums").parent().find("label").append("Open");
btn.click(function() {
var id = $("#forums").val();
diff --git a/app/templates/packages/create_edit.html b/app/templates/packages/create_edit.html
index 0953ce5..e6fe400 100644
--- a/app/templates/packages/create_edit.html
+++ b/app/templates/packages/create_edit.html
@@ -22,7 +22,7 @@
{% endif %}
-
+
{% endblock %}
{% block content %}