From: Joe Wreschnig Date: Thu, 29 May 2014 22:29:53 +0000 (+0200) Subject: Handle link nature of buttons in a nicer way by preventing defaults. X-Git-Url: https://git.yukkurigames.com/?a=commitdiff_plain;h=c83ea64a4347932b5eda703374e5ce2d9aebb165;p=labelle.git Handle link nature of buttons in a nicer way by preventing defaults. --- diff --git a/acnl-outfit.js b/acnl-outfit.js index 333335b..018fe03 100644 --- a/acnl-outfit.js +++ b/acnl-outfit.js @@ -124,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? @@ -135,4 +135,6 @@ function litanizeElement (eid, tid) { choice(["Going out in ", "Labelle suggested ", "I'll wear "]) + litanize(o, false) + ".")); + if (ev) + ev.preventDefault(); } diff --git a/index.html b/index.html index ac2aadc..0024c21 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@ #buttons { text-align: center } - a.button { + .button { font-size: 2em; text-decoration: none; background-color: #eee; @@ -33,14 +33,14 @@ white-space: nowrap; } - #twitter-share-button { + .button.twitter { padding: 2px 5px 2px 0.9em; - background: url('twitter.png') 0.2em center no-repeat #EEEEEE; + background: url('twitter.png') 0.2em center no-repeat #eee; } } - +
-
+
What is this?
@@ -113,10 +114,11 @@ due to its size (estimated ~150MB). If you have one and want to host it, let me know.
- -
It generated an invalid outfit / sentence / MoriDB link.
- It can't generate some valid outfit.
- You're missing my favorite item.
+
+ It generated an invalid outfit / sentence / MoriDB link.
+ It can't generate some valid outfit.
+ You're missing my favorite item. +
Email me (joe.wreschnig at gmail) with the details, please. I'm certain there's still miscategorized caps/hats