This repository has been archived by the owner on Jan 9, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
86 lines (76 loc) · 2.08 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="cache-control" content="no-cache, must-revalidate, post-check=0, pre-check=0">
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro" rel="stylesheet">
<title>Eternal Card Display</title>
<style>
body {
color: #FFF;
font-family: 'Source Sans Pro', sans-serif;
}
h2 {
color: #444;
}
table {
font-size: 1.1em;
line-height: 0.9em;
text-shadow: #000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px,
#000 0px 0px 1px, #000 0px 0px 1px, #000 0px 0px 1px;
}
tr, td {
}
</style>
</head>
<body>
<h2>Paste Your Eternal Deck</h2>
<table id="myTable" style="width:100%">
<tr>
<th></th>
<th></th>
</tr>
</table>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
<script>
$( document ).ready(function() {
$(this).on('paste', function(e) {
$('#myTable').empty();
var pasteData = e.originalEvent.clipboardData.getData('text');
var splitData = pasteData.split(')');
var cardInput = [];
var count = 0;
var data1 = "";
var data2 = "";
var d1 = "";
var d2 = "";
for (let value of splitData) {
//data1 = cardInput.push(value.charAt(0));
//console.log(value);
d1 = value.trim().split(' ')[0];
//data2 = cardInput.push(value.split('\(')[0].substr(2));
d2 = value.split('\(')[0].trim().substr(2);
//console.log(d1);
$('#myTable').append("<tr><td>"+d1+"</td><td>"+d2+"</td></tr>");
count++;
}
$('h2').hide();
/*
console.log("\nSPLIT");
console.log(splitData);
console.log("\nCARD");
console.log(cardInput);
*/
//var cardCount = splitData.
//var cardName = splitData
// console.log(splitData);
$('body').css({backgroundColor: '#0000FF'})
});
$("html").click(function() {
$('#myTable').empty();
});
});
</script>
</body>
</html>