Skip to content

Commit 9bec55a

Browse files
committedJul 28, 2014
Jeremy greatly improves my babytalk JS.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 01ea2e3 commit 9bec55a

File tree

1 file changed

+39
-36
lines changed

1 file changed

+39
-36
lines changed
 

‎web/faq.html

+39-36
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,17 @@
88

99
<script src="js/jquery-1.11.0.min.js"></script>
1010
<script>
11-
function more(a) {
12-
if ($(a).next('[class=details]').css('display') != 'none') {
13-
$(a).nextAll('[class=details]').css('display', 'none');
14-
} else {
15-
$(a).nextAll('[class=details]').css('display', 'block');
16-
}
17-
return false;
11+
function more(event) {
12+
var elem = $(event.target).parents("div").find("p.details");
13+
var display = elem.css("display");
14+
display = display == "none" ? "block" : "none";
15+
elem.css("display", display);
16+
return false;
1817
}
18+
19+
$(document).ready(function() {
20+
$("div.boxed h4 a").click(more);
21+
});
1922
</script>
2023
</head>
2124

@@ -32,7 +35,7 @@ <h1> Pettycoin: Frequently Asked Questions </h1>
3235
<h2>Pettycoin vs Bitcoin</h2>
3336

3437
<div class="boxed">
35-
<h4 id="altcoin"><a href="#altcoin" onclick="return more('#altcoin');">
38+
<h4 id="altcoin"><a href="#altcoin">
3639
Is pettycoin an altcoin?
3740
</a></h4>
3841
<p class="details">
@@ -47,7 +50,7 @@ <h4 id="altcoin"><a href="#altcoin" onclick="return more('#altcoin');">
4750
</div>
4851

4952
<div class="boxed">
50-
<h4 id="compete"><a href="#compete" onclick="return more('#compete');">
53+
<h4 id="compete"><a href="#compete">
5154
Does pettycoin compete with bitcoin?
5255
</a></h4>
5356
<p class="details">
@@ -60,7 +63,7 @@ <h4 id="compete"><a href="#compete" onclick="return more('#compete');">
6063
</div>
6164

6265
<div class="boxed">
63-
<h4 id="mergemine"><a href="#mergemine" onclick="return more('#mergemine');">
66+
<h4 id="mergemine"><a href="#mergemine">
6467
Can bitcoin miners mergemine pettycoin?
6568
</a></h4>
6669
<p class="details">
@@ -69,7 +72,7 @@ <h4 id="mergemine"><a href="#mergemine" onclick="return more('#mergemine');">
6972
</div>
7073

7174
<div class="boxed">
72-
<h4 id="sidechain"><a href="#sidechain" onclick="return more('#sidechain');">
75+
<h4 id="sidechain"><a href="#sidechain">
7376
Is pettycoin a sidechain?
7477
</a></h4>
7578
<p class="details">
@@ -82,7 +85,7 @@ <h4 id="sidechain"><a href="#sidechain" onclick="return more('#sidechain');">
8285
</div>
8386

8487
<div class="boxed">
85-
<h4 id="fees"><a href="#fees" onclick="return more('#fees');">
88+
<h4 id="fees"><a href="#fees">
8689
What fees does a pettycoin transaction have?
8790
</a></h4>
8891
<p class="details">
@@ -95,7 +98,7 @@ <h4 id="fees"><a href="#fees" onclick="return more('#fees');">
9598
</div>
9699

97100
<div class="boxed">
98-
<h4 id="miner-paid"><a href="#miner-paid" onclick="return more('#miner-paid');">
101+
<h4 id="miner-paid"><a href="#miner-paid">
99102
How do pettycoin miners get paid?
100103
</a></h4>
101104
<p class="details">
@@ -114,7 +117,7 @@ <h4 id="miner-paid"><a href="#miner-paid" onclick="return more('#miner-paid');">
114117
<h2> Getting Bitcoins Into and Out of Pettycoin </h2>
115118

116119
<div class="boxed">
117-
<h4 id="into-pettycoin"><a href="#into-pettycoin" onclick="return more('#into-pettycoin');">
120+
<h4 id="into-pettycoin"><a href="#into-pettycoin">
118121
How do I get bitcoin into the pettycoin network?
119122
</a></h4>
120123
<p class="details">
@@ -126,7 +129,7 @@ <h4 id="into-pettycoin"><a href="#into-pettycoin" onclick="return more('#into-pe
126129
</div>
127130

128131
<div class="boxed">
129-
<h4 id="out-of-pettycoin"><a href="#out-of-pettycoin" onclick="return more('#out-of-pettycoin');">
132+
<h4 id="out-of-pettycoin"><a href="#out-of-pettycoin">
130133
How do I get bitcoin off the pettycoin network?
131134
</a></h4>
132135
<p class="details">
@@ -143,7 +146,7 @@ <h4 id="out-of-pettycoin"><a href="#out-of-pettycoin" onclick="return more('#out
143146
</div>
144147

145148
<div class="boxed">
146-
<h4 id="forgotten-coins"><a href="#forgotten-coins" onclick="return more('#forgotten-coins');">
149+
<h4 id="forgotten-coins"><a href="#forgotten-coins">
147150
What happens if I forget my pettycoins?
148151
</a></h4>
149152
<p class="details">
@@ -154,7 +157,7 @@ <h4 id="forgotten-coins"><a href="#forgotten-coins" onclick="return more('#forgo
154157
</div>
155158

156159
<div class="boxed">
157-
<h4 id="to-bitcoin-user"><a href="#to-bitcoin-user" onclick="return more('#to-bitcoin-user');">
160+
<h4 id="to-bitcoin-user"><a href="#to-bitcoin-user">
158161
Can I send bitcoins to a bitcoin user via the pettycoin network?
159162
</a></h4>
160163
<p class="details">
@@ -178,7 +181,7 @@ <h2> What Are The Worst Things About Pettycoin? </h2>
178181
</div>
179182

180183
<div class="boxed">
181-
<h4 id="privacy"><a href="#privacy" onclick="return more('#privacy');">
184+
<h4 id="privacy"><a href="#privacy">
182185
Horrible privacy properties.
183186
</a></h4>
184187
<p class="details">
@@ -200,7 +203,7 @@ <h4 id="privacy"><a href="#privacy" onclick="return more('#privacy');">
200203
</div>
201204

202205
<div class="boxed">
203-
<h4 id="gateway-trust"><a href="#gateway-trust" onclick="return more('#gateway-trust');">
206+
<h4 id="gateway-trust"><a href="#gateway-trust">
204207
Trusting the gateways.
205208
</a></h4>
206209
<p class="details">
@@ -218,7 +221,7 @@ <h4 id="gateway-trust"><a href="#gateway-trust" onclick="return more('#gateway-t
218221
</div>
219222

220223
<div class="boxed">
221-
<h4 id="no-gui"><a href="#no-gui" onclick="return more('#no-gui');">
224+
<h4 id="no-gui"><a href="#no-gui">
222225
No GUI.
223226
</a></h4>
224227
<p class="details">
@@ -228,7 +231,7 @@ <h4 id="no-gui"><a href="#no-gui" onclick="return more('#no-gui');">
228231
</div>
229232

230233
<div class="boxed">
231-
<h4 id="web-sucks"><a href="#web-sucks" onclick="return more('#web-sucks');">
234+
<h4 id="web-sucks"><a href="#web-sucks">
232235
Terrible logo and web pages.
233236
</a></h4>
234237
<p class="details">
@@ -240,21 +243,21 @@ <h4 id="web-sucks"><a href="#web-sucks" onclick="return more('#web-sucks');">
240243
</div>
241244

242245
<div class="boxed">
243-
<h4 id="author-sucks"><a href="#author-sucks" onclick="return more('#author-sucks');">
246+
<h4 id="author-sucks"><a href="#author-sucks">
244247
The main author is annoying.
245248
</a></h4>
246249
<p class="details">
247250
I mean, he lives in a half-hour timezone. Who does that? WHO???
248251
</p>
249252
<p class="details">
250-
But his wife is hot!
253+
But his wife is awesome! (And thanks for proofreading!)
251254
</p>
252255
</div>
253256

254257
<h2> The Protocol Details </h2>
255258

256259
<div class="boxed">
257-
<h4 id="address"><a href="#address" onclick="return more('#address');">
260+
<h4 id="address"><a href="#address">
258261
What does an address look like?
259262
</a></h4>
260263
<p class="details">
@@ -271,7 +274,7 @@ <h4 id="address"><a href="#address" onclick="return more('#address');">
271274
</div>
272275

273276
<div class="boxed">
274-
<h4 id="transaction"><a href="#transaction" onclick="return more('#transaction');">
277+
<h4 id="transaction"><a href="#transaction">
275278
What does a transaction look like?
276279
</a></h4>
277280

@@ -323,7 +326,7 @@ <h4 id="transaction"><a href="#transaction" onclick="return more('#transaction')
323326
</div>
324327

325328
<div class="boxed">
326-
<h4 id="shard"><a href="#shard" onclick="return more('#shard');">
329+
<h4 id="shard"><a href="#shard">
327330
What does a shard look like?
328331
</a></h4>
329332
<p class="details">
@@ -340,7 +343,7 @@ <h4 id="shard"><a href="#shard" onclick="return more('#shard');">
340343
</div>
341344

342345
<div class="boxed">
343-
<h4 id="block"><a href="#block" onclick="return more('#block');">
346+
<h4 id="block"><a href="#block">
344347
What does a block look like?
345348
</a></h4>
346349
<p class="details">
@@ -370,7 +373,7 @@ <h4 id="block"><a href="#block" onclick="return more('#block');">
370373
</div>
371374

372375
<div class="boxed">
373-
<h4 id="miners"><a href="#miners" onclick="return more('#miners');">
376+
<h4 id="miners"><a href="#miners">
374377
Why do miners need to know the whole network?
375378
</a></h4>
376379

@@ -395,7 +398,7 @@ <h4 id="miners"><a href="#miners" onclick="return more('#miners');">
395398
</div>
396399

397400
<div class="boxed">
398-
<h4 id="horizon"><a href="#horizon" onclick="return more('#horizon');">
401+
<h4 id="horizon"><a href="#horizon">
399402
What happens to old blocks?
400403
</a></h4>
401404
<p class="details">
@@ -412,7 +415,7 @@ <h4 id="horizon"><a href="#horizon" onclick="return more('#horizon');">
412415
</div>
413416

414417
<div class="boxed">
415-
<h4 id="miner-claims"><a href="#miner-claims" onclick="return more('#miner-claims');">
418+
<h4 id="miner-claims"><a href="#miner-claims">
416419
How do miners claim their reward?
417420
</a></h4>
418421
<p class="details">
@@ -429,7 +432,7 @@ <h4 id="miner-claims"><a href="#miner-claims" onclick="return more('#miner-claim
429432
</div>
430433

431434
<div class="boxed">
432-
<h4 id="complaints"><a href="#complaints" onclick="return more('#complaints');">
435+
<h4 id="complaints"><a href="#complaints">
433436
How do nodes indicate they've found a problem?
434437
</a></h4>
435438
<p class="details">
@@ -488,7 +491,7 @@ <h4 id="complaints"><a href="#complaints" onclick="return more('#complaints');">
488491
<h2> Status, And Unimplemented Stuff </h2>
489492

490493
<div class="boxed">
491-
<h4 id="status"><a href="#status" onclick="return more('#status');">
494+
<h4 id="status"><a href="#status">
492495
What is the current status?
493496
</a></h4>
494497
<p class="details">
@@ -512,7 +515,7 @@ <h4 id="status"><a href="#status" onclick="return more('#status');">
512515
</div>
513516

514517
<div class="boxed">
515-
<h4 id="todo-protocol"><a href="#todo-protocol" onclick="return more('#todo-protocol');">
518+
<h4 id="todo-protocol"><a href="#todo-protocol">
516519
What features are unimplemented in the protocol?
517520
</a></h4>
518521
<p class="details">
@@ -539,7 +542,7 @@ <h4 id="todo-protocol"><a href="#todo-protocol" onclick="return more('#todo-prot
539542
</div>
540543

541544
<div class="boxed">
542-
<h4 id="todo-client"><a href="#todo-client" onclick="return more('#todo-client');">
545+
<h4 id="todo-client"><a href="#todo-client">
543546
What features are unimplemented in the client?
544547
</a></h4>
545548
<p class="details">
@@ -562,7 +565,7 @@ <h4 id="todo-client"><a href="#todo-client" onclick="return more('#todo-client')
562565
</div>
563566

564567
<div class="boxed">
565-
<h4 id="todo-tools"><a href="#todo-tools" onclick="return more('#todo-tools');">
568+
<h4 id="todo-tools"><a href="#todo-tools">
566569
What tools need to be written?
567570
</a></h4>
568571
<ul class="details">
@@ -576,7 +579,7 @@ <h4 id="todo-tools"><a href="#todo-tools" onclick="return more('#todo-tools');">
576579
<h2> About The Developers </h2>
577580

578581
<div class="boxed">
579-
<h4 id="whoami"><a href="#whoami" onclick="return more('#whoami');">
582+
<h4 id="whoami"><a href="#whoami">
580583
Who are you?
581584
</a></h4>
582585

0 commit comments

Comments
 (0)
Please sign in to comment.