X-Git-Url: https://git.yukkurigames.com/?p=labelle.git;a=blobdiff_plain;f=acnl-outfit.js;h=018fe03fc11413ad7edf6776a5f35ce042b4b44a;hp=50b98325c5481e81e52af03850c983ae30c83079;hb=b41e44e3108d40958ea2f9bab8f9907b296e213f;hpb=a3c1e9ba1e78827a8045d4bb874af9c6e0c45ff0 diff --git a/acnl-outfit.js b/acnl-outfit.js index 50b9832..018fe03 100644 --- a/acnl-outfit.js +++ b/acnl-outfit.js @@ -76,7 +76,8 @@ function isPosessive (item) { } function isPlural (item) { - return (item.substr(-1) === "s" + return item.substr(-8) === "headgear" + || (item.substr(-1) === "s" && item.substr(-2) !== "ss" && item.substr(-6) !== "cosmos"); // :( } @@ -123,7 +124,7 @@ function litanize (names, link) { return names.join(names.length == 2 ? " " : ", "); } -function litanizeElement (eid, tid) { +function litanizeElement (eid, tid, ev) { var o = outfit(); document.getElementById(eid).innerHTML = litanize(o, true) + "?"; // TODO: This often generates > 140 characters. Do I care? @@ -134,4 +135,6 @@ function litanizeElement (eid, tid) { choice(["Going out in ", "Labelle suggested ", "I'll wear "]) + litanize(o, false) + ".")); + if (ev) + ev.preventDefault(); }