-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
106 lines (97 loc) · 5 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ForkDelta legacy page</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
<style>
.private-key-hidden {}
.form-group.row label {
font-weight: 600;
}
</style>
</head>
<body class="bg-light">
<div class="container">
<div class="pt-4 pb-2 text-center">
<img class="d-block mx-auto mb-4" src="logo.png" alt="ForkDelta logo" width="128" height="128">
<h1 style="font-size: 2rem; font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif; font-weight: bold;">Old Home of ForkDelta</h1>
<p class="text-center">ForkDelta has moved to https://forkdelta.app</p>
</div>
<div class="row justify-content-center mb-2">
<div class="col-md-6 col-lg-5 text-align center">
<a class="btn btn-primary btn-lg btn-block go-to-trading" href="https://forkdelta.app">Go to Trading →</a>
</div>
</div>
<div class="py-2 text-center">
<a class="btn btn-link" data-toggle="collapse" data-target="#accountsReveal" role="button" aria-expanded="false" aria-controls="accountsReveal">Reveal locally stored accounts ▾</a>
</div>
<div class="collapse" id="accountsReveal">
<ul class="accounts-list list-unstyled row col-sm-12 col-xl-10 mx-auto mb-2">
<li class="col-sm-12 pk-template" style="display: none;">
<form>
<div class="form-group row">
<label for="address" class="col-sm-3 col-form-label">Address</label>
<div class="col-sm-9">
<input type="text" readonly class="form-control-plaintext" name="address" value="0x041623D460203d279Da727169118E79bee5424F6">
</div>
</div>
<div class="form-group row">
<label for="private-key" class="col-sm-3 col-form-label">Private key</label>
<div class="col-sm-9">
<div class="input-group mb-3">
<input type="password" class="form-control" name="private-key" readonly value="8262ba26f6f7fc9b5c47b5bf01423f2da2f256b85dd25c7fb87d1523299f109a">
<div class="input-group-append">
<button class="btn btn-outline-secondary pk-copier" type="button" data-clipboard-text="8262ba26f6f7fc9b5c47b5bf01423f2da2f256b85dd25c7fb87d1523299f109a">Copy</button>
<button class="btn btn-outline-secondary pk-revealer" type="button">Reveal</button>
</div>
</div>
</div>
</div>
</form>
<hr>
</li>
</ul>
<div class="no-accounts row col-sm-12 col-xl-10 mx-auto mb-2" style="display: none;">
<strong>No locally stored accounts found.</strong>
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/js/bootstrap.min.js" integrity="sha384-ChfqqxuZUCnJSK3+MXmPNIyE6ZbWh2IMqE241rYiqJxyMiZ6OW/JmZQ5stwEULTy" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.1/clipboard.min.js" integrity="sha256-hIvIxeqhGZF+VVeM55k0mJvWpQ6gTkWk3Emc+NmowYA=" crossorigin="anonymous"></script>
<script>
$(function () {
var currentLocation = document.location.toString();
$(".go-to-trading").attr("href", currentLocation.replace("forkdelta.github.io", "forkdelta.app"));
var settingsJSON = localStorage.getItem("EtherDelta");
var settingsObject = JSON.parse(settingsJSON);
var accounts = settingsObject && settingsObject.accounts ? settingsObject.accounts.filter(function (e) { return e.pk; }) : [];
if (accounts.length > 0) {
var $list = $("ul.accounts-list");
accounts.forEach(function(account) {
var $accountEntry = $(".pk-template").clone();
$accountEntry.removeClass("pk-template");
$("input[name='address']", $accountEntry).val(account.addr);
$("input[name='private-key']", $accountEntry).val(account.pk);
$(".pk-copier", $accountEntry).attr("data-clipboard-text", account.pk);
$list.append($accountEntry);
$accountEntry.show();
});
} else {
$(".accounts-list").hide();
$(".no-accounts").show();
}
$("button.pk-revealer").on("click", function () {
var $this = $(this);
var pkField = $this.parents("form").find("input[name='private-key']");
var isHidden = pkField.attr("type") === "password";
pkField.attr("type", isHidden ? "text" : "password");
$this.html(isHidden ? "Hide" : "Reveal");
});
var clipboard = new ClipboardJS('.pk-copier');
});
</script>
</body>
</html>