This repository has been archived by the owner on Apr 19, 2019. It is now read-only.
forked from jfnaud/Guild-Wars-2-Gold-per-hour
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
266 lines (247 loc) · 15.6 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
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Guild Wars 2 - Gold per Hour</title>
<meta name="description" content="How much gold you made since you started the application">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="css/normalize.css">
<link rel="stylesheet" href="css/main.css">
<link rel="stylesheet" href="css/goldPerHour.css">
<link rel="stylesheet" href="css/spinner.css">
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,900' rel='stylesheet' type='text/css'>
<script src="js/vendor/modernizr-2.8.3.min.js"></script>
</head>
<body>
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
<![endif]-->
<h1>Guild Wars 2 - Gold per Hour</h1>
<div id="intro">
<h2>Welcome to Guild Wars 2 - Gold per Hour</h2>
<p>This application tracks everything (<em>almost!</em>) that is going on with your account and displays how much gold you would get if you were to sell all the items you acquired, and how much gold you've lost from the items that were removed from your account (sold, destroyed, consumed, etc.).</p>
<p>I said <em>almost</em>, because for now I can't track items and gold that are waiting to be picked up at the trading post, nor the items in your guild banks. When Arenanet will add new APIs to access this, I will update the application.</p>
<p>Note that in some case, it might take 2 or 3 refreshes for the acquired or lost items to appear. The API doesn't return live data each time it's called, so please be patient :)</p>
<hr>
<h2>To begin, enter your API key here:</h2>
<input type="text" id="apiKey" maxwidth="100" value="">
<button id="continueIntro">Go!</button>
<br>
<label class="small" for="saveAPIKey"><input type="checkbox" id="saveAPIKey"> Save my API key locally, so I won't have to enter it next time</label>
<p>You don't have one? Go to <a href="https://www.guildwars2.com/" target="_blank">guildwars2.com</a> and log in to your account. Then, in the <strong>Applications</strong> tab, create a new API key. Make sure you grant <em>wallet, tradingpost, account, inventories</em> and <em>characters</em> permissions.</p>
<div class="borderTop"></div>
<div class="borderRight"></div>
<div class="borderBottom"></div>
<div class="borderLeft"></div>
</div>
<div id="menu" style="display:none;">
<span id="about"><img src="img/about.png" alt="about" title="About">About</span>
<span class="separator">|</span>
<span id="settings"><img src="img/settings.png" alt="settings" title="Settings">Settings</span>
<span class="separator">|</span>
<span id="countdown"></span>
<button id="stop">Stop</button>
<button id="resume">Resume</button>
<button id="startOver">Start over</button>
</div>
<div id="main">
<h2>Summary <span class="toggle" id="toggleSummary">(toggle)</span></h2>
<div id="header">
<div id="headerLeft">
<table id="summary">
<tr>
<td>Initial gold (<span id="startTime"></span>):</td>
<td id="initialGold"></td>
</tr>
<tr>
<td class="bottomBorder">Current gold (<span id="currentTime"></span>):</td>
<td id="currentGold" class="price bottomBorder"></td>
</tr>
<tr>
<td>Gold difference: </td>
<td id="overallGoldDifference" class="price"></td>
</tr>
<tr>
<td>+ Gains from acquired items (before fees): </td>
<td id="overallGains" class="price"></td>
</tr>
<tr>
<td>- Listing and selling fees (15%): </td>
<td id="overallFees" class="price"></td>
</tr>
<tr>
<td class="bottomBorder">- Losses from lost items (<em>including</em> fees): </td>
<td id="overallLosses" class="price bottomBorder"></td>
</tr>
<tr>
<td class="bottomBorder">Result: </td>
<td id="overallResult" class="price bottomBorder"></td>
</tr>
<tr>
<td>Average gold per hour: </td>
<td id="overallAverage" class="price"></td>
</tr>
</table>
</div>
<div id="headerRight">
<div id="chart"></div>
</div>
</div>
<h2>Acquired items <span class="toggle" id="toggleNew">(toggle)</span></h2>
<div id="newItems">
<div id="gridNew"></div>
<div id="spinnerNew" class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
<p class="none">None so far...</p>
<div class="results" id="totalNew" style="display: none;"></div>
</div>
<h2>Lost items <span class="toggle" id="toggleOld">(toggle)</span></h2>
<div id="oldItems">
<div id="gridOld"></div>
<div id="spinnerOld" class="spinner">
<div class="bounce1"></div>
<div class="bounce2"></div>
<div class="bounce3"></div>
</div>
<p class="none">None so far...</p>
<div class="results" id="totalOld" style="display: none;"></div>
</div>
<h2>Other currencies <span class="toggle" id="toggleCurrencies">(toggle)</span></h2>
<div id="otherCurrencies">
<div id="currencies"></div>
<div id="currenciesGraph"></div>
</div>
<div class="borderTop"></div>
<div class="borderRight"></div>
<div class="borderBottom"></div>
<div class="borderLeft"></div>
</div>
<div id="newVersion"></div>
<div id="warning"></div>
<footer>
Made by Deviljeff.1946 - <a href="https://github.com/jfnaud/Guild-Wars-2-Gold-per-hour" target="_blank" title="Project on GitHub">Project on GitHub (v. <span id="currentVersion"></span>)</a>
<br>
<span class="clearAPIKey">Reset my saved API key</span>
<!--<br><button id="saveCurrentState">Debug</button>-->
</footer>
<div id="popupOverlay"></div>
<div id="aboutPopup">
<h2>About</h2>
<p>This application tracks everything (<em>almost!</em>) that is going on with your account and displays how much gold you would get if you were to sell all the items you acquired, and how much gold you've lost from the items that were removed from your account (sold, destroyed, consumed, etc.).</p>
<p>I said <em>almost</em>, because for now I can't track items and gold that are waiting to be picked up at the trading post, nor the items in your guild banks. When Arenanet will add new APIs to access this, I will update the application.</p>
<p>Note that in some case, it might take 2 or 3 refreshes for the acquired or lost items to appear. The API doesn't return live data each time it's called, so please be patient :)</p>
<hr>
<p>Check out the <strong>Settings</strong> to customize the interface and your preferences. These settings will be saved locally for the next time you use this application!<p>
<hr>
<p>I had some free time and I wanted to do something useful for the community. I hope you enjoy it as much as I had doing this project! A special thanks to my friends who helped me test this application. If you find bugs or have any suggestion on how I could improve it, send me an in-game mail at <strong>Deviljeff.1946</strong> or a private message on <a href="https://www.reddit.com/message/compose/?to=Deviljeff" target="_blank" title="Send a private message on reddit">Reddit</a>.</p>
</div>
<div id="settingsPopup">
<h2>Settings</h2>
<table>
<tr class="threeCols">
<td><label for="toggleDetails"><input type="checkbox" id="toggleDetails"> Show item details</label></td>
<td colspan="2"><label for="toggleSound"><input type="checkbox" id="toggleSound"> Play a sound effect when refreshing</label></td>
</tr>
<tr class="threeCols">
<td>
<h3>Sort items by:</h3>
<label for="sortByRarity"><input type="radio" value="rarity" name="sortBy" id="sortByRarity"> Rarity</label><br>
<label for="sortByValue"><input type="radio" value="value" name="sortBy" id="sortByValue"> Descending value</label>
</td>
<td>
<h3>For item values, use:</h3>
<label for="lowestSeller"><input type="radio" value="lowestSeller" name="valueFrom" id="lowestSeller"> Lowest seller (list items)</label><br>
<label for="highestBuyer"><input type="radio" value="highestBuyer" name="valueFrom" id="highestBuyer"> Highest buyer (sell instantly)</label>
</td>
<td>
<h3>Gold per hour based on:</h3>
<label for="sinceStart"><input type="radio" value="sinceStart" name="baseTime" id="sinceStart"> Time elapsed since the start</label><br>
<label for="elapsed"><input type="radio" value="elapsed" name="baseTime" id="elapsed"> Time elapsed while running</label>
</td>
</tr>
<tr>
<td colspan="3">
<table id="typesList">
<thead>
<th><input type="checkbox" id="checkAllTypes" checked="checked"></th>
<th colspan="7">Show items of these types:</th>
</thead>
<tbody>
<tr>
<td><input type="checkbox" data-type="Armor" id="ArmorItem" class="itemType"></td>
<td><label for="ArmorItem">Armor</label></td>
<td><input type="checkbox" data-type="Back" id="BackItem" class="itemType"></td>
<td><label for="BackItem">Back item</label></td>
<td><input type="checkbox" data-type="Bag" id="BagItem" class="itemType"></td>
<td><label for="BagItem">Bags</label></td>
</tr>
<tr>
<td><input type="checkbox" data-type="Consumable" id="ConsumableItem" class="itemType"></td>
<td><label for="ConsumableItem">Consumables</label></td>
<td><input type="checkbox" data-type="Container" id="ContainerItem" class="itemType"></td>
<td><label for="ContainerItem">Containers</label></td>
<td><input type="checkbox" data-type="CraftingMaterial" id="CraftingMaterialItem" class="itemType"></td>
<td><label for="CraftingMaterialItem">Crafting materials</label></td>
</tr>
<tr>
<td><input type="checkbox" data-type="Gathering" id="GatheringItem" class="itemType"></td>
<td><label for="GatheringItem">Gathering tools</label></td>
<td><input type="checkbox" data-type="Gizmo" id="GizmoItem" class="itemType"></td>
<td><label for="GizmoItem">Gizmos</label></td>
<td><input type="checkbox" data-type="MiniPet" id="MiniPetItem" class="itemType"></td>
<td><label for="MiniPetItem">Miniatures</label></td>
</tr>
<tr>
<td><input type="checkbox" data-type="Tool" id="ToolItem" class="itemType"></td>
<td><label for="ToolItem">Salvage kits</label></td>
<td><input type="checkbox" data-type="Trait" id="TraitItem" class="itemType"></td>
<td><label for="TraitItem">Trait guides</label></td>
<td><input type="checkbox" data-type="Trinket" id="TrinketItem" class="itemType"></td>
<td><label for="TrinketItem">Trinkets</label></td>
</tr>
<tr>
<td><input type="checkbox" data-type="Trophy" id="TrophyItem" class="itemType"></td>
<td><label for="TrophyItem">Trophies</label></td>
<td><input type="checkbox" data-type="UpgradeComponent" id="UpgradeComponentItem" class="itemType"></td>
<td><label for="UpgradeComponentItem">Upgrade components</label></td>
<td><input type="checkbox" data-type="Weapon" id="WeaponItem" class="itemType"></td>
<td><label for="WeaponItem">Weapons</label></td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td colspan="3">
<label for="ignoreHidden"><input type="checkbox" id="ignoreHidden"> Ignore the value of hidden items</label>
</td>
</tr>
</table>
<hr>
<div id="settingsButtons">
<button id="restoreDefaults">Restore default settings</button>
<button class="clearAPIKey">Reset my saved API key</button>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.3.min.js"><\/script>')</script>
<script src="https://code.jquery.com/ui/1.11.4/jquery-ui.min.js"></script>
<script src="js/vendor/highstock.js"></script>
<script src="js/console.js"></script>
<script src="js/main.js"></script>
<!-- Google analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-68722111-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html>