diff --git a/config.js b/config.js
index 91d53ea..f2490d5 100644
--- a/config.js
+++ b/config.js
@@ -1,13 +1,27 @@
// TODO These code bits don't really belong here, but this is the only shared bit of js
+function tabulate(html) {
+ var result = '';
+ $("
").html(html).find("tr").each(function () {
+ result += " " + $(this).children().first().text() + ": " +
+ $(this).children().last().text() + "\n";
+ });
+ return result;
+}
+
+
function template(id, data) {
var tmpl = $("#" + id).html();
var brag = tmpl.replace(/\$([_A-Za-z.]+)/g, function (str, p1) {
var dict = data;
$.each(p1.split("."), function (i,v) {
if (!dict) return true;
- dict = dict[v];
+ if (v == "___") {
+ dict = tabulate(dict.html);
+ } else {
+ dict = dict[v.replace("_"," ")];
+ }
return null;
});
return dict || '';
diff --git a/main.html b/main.html
index c5b15fc..7f3823d 100644
--- a/main.html
+++ b/main.html
@@ -191,13 +191,13 @@ Stats:
CHA $Stats.CHA MP Max $Stats.MP_Max
Equipment:
- $Equips.___
+$Equips.___
Spell Book:
- $Spells.___
+$Spells.___
Inventory ($EncumBar.Hint):
- $Inventory.___
+$Inventory.___
-- $date
-- Progress Quest 6.3.web - http://progressquest.com/