-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathpopup.html
57 lines (54 loc) · 1.29 KB
/
popup.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
<html>
<head>
<title>Item Popup</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script>
function findGetParameter(parameterName) {
var result = null,
tmp = [];
location.search
.substr(1)
.split("&")
.forEach(function (item) {
tmp = item.split("=");
if (tmp[0] === parameterName) result = decodeURIComponent(tmp[1]);
});
return result;
}
var item_name = findGetParameter('item');
var clean_item_name = item_name.replace(/[_]/g, ' ');
document.title = clean_item_name;
</script>
<script src='data.js'></script>
</head>
<body>
<table>
<tr>
<td>
<img id='image_content' src='' width=240px border=2>
</td>
<td> </td>
<td style="vertical-align:top;font-size:18px;">
<h3 id='title_content'>Placeholder</h3>
<span id='text_content'>
</span>
</td>
</tr>
<tr>
<td colspan=3>
<br><br>
<center id='stats_content'>
</center>
</td>
</tr>
</table>
<br>
<button onclick="window.close()">Close</button>
<script>
$('#stats_content').html(item_lookup[item_name].stats);
$('#text_content').html(item_lookup[item_name].text);
$('#title_content').html(item_lookup[item_name].title);
$('#image_content').attr('src', item_lookup[item_name].image);
</script>
</body>
</html>