forked from aunefyren/wrapperr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
175 lines (133 loc) · 6.26 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
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
<title>Plex Wrapped</title>
<!-- Bootstrap 4 CSS and custom CSS -->
<link rel="stylesheet" type="text/css" href="assets/css/wrapped.css" />
<link rel="shortcut icon" href="assets/img/favicons/favicon.ico" />
<link href="https://fonts.googleapis.com/css2?family=Roboto&display=swap" rel="stylesheet">
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<script src="./index.js"></script>
<script src="./get_stats.js"></script>
<script src="./get_functions.js"></script>
</head>
<body id='body'>
<div class="content_landing" id="login_content" style="">
<div class="boks">
<div class="boks3" id="search_input" style="padding: 0 !important;">
<div class="boks2" style="float: none !important; display: block; padding: 0; margin-top: 0em;">
<img src="assets/img/gift.svg" onclick="window.location.href = './';" style="width: 15em; cursor: pointer;">
</div>
<div class="boks2" style="float: none !important; display: block; margin-top: 0em; padding-top: 0;">
<div class="stats_tekst" id='intro_text' style="height: auto;">
<p>
Did you get that thing from Spotify and wondered what your Plex statistics looked like?
<br><br>Well, have a look...
</p>
</div>
<br>
<div class="status" id="stats" style="">
<h1>Plex Wrapped</h1>
<div class="search">
<form id='plex_login_form' class='form' onsubmit='return false' action="" method="post">
<div class="form-group" id='plex_login_div'>
<button class='form-control btn' name="plex_login_button" id="plex_login_button">
<img src='assets/external-link.svg' class='btn_logo'>
<p2 id='plex_login_button_text'>Sign in using Plex</p2>
</button>
</div>
</form>
<form id='search_wrapped_form' class='form' onsubmit='return false' action="" method="post" style="display: none;">
<div class="form-group" id='search_wrapped_div'>
<button class='form-control btn' name="search_wrapped_button" id="search_wrapped_button" style='opacity: 0.5;' disabled>
<img src='assets/done.svg' class='btn_logo'>
<p2 id='plex_login_button_text'>Plex Wrapped</p2>
</button>
</div>
</form>
<div class="form-group" id='sign_out_div' style='display: none;'>
<button class='form-control btn' name="plex_signout_button" id="plex_signout_button" onclick='sign_out()'>
<img src='assets/close.svg' class='btn_logo'>
<p2 id='plex_signout_button_text'>Sign Out</p2>
</button>
</div>
</div>
<img id="loading_icon" src="assets/loading.gif" style="border-radius: 25px; background-color: white; padding: 1em;width: 4em; height: 4em; display:none; margin: 1em 0 0 0;">
<div id="results">
</div>
<div id="results_error" style="padding:0.5em; bottom:0; color: #ffbd55 !important;"></div>
</div>
</div>
</div>
<div class="snowflakes" aria-hidden="true" id="snowflakes">
<div class="snowflake">
❅
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❄
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❄
</div>
<div class="snowflake">
❅
</div>
<div class="snowflake">
❆
</div>
<div class="snowflake">
❄
</div>
</div>
</div>
</div>
<div class="footer" id="footer">
<a style="color: white; font-weight: normal; font-size: 0.75em; text-decoration: none;" href="./">Wrapped</a> |
<a style="color: white; font-weight: normal; font-size: 0.75em; text-decoration: none;" href="./admin">Admin</a> |
<a style="color: white; font-weight: normal; font-size: 0.75em; text-decoration: none;" href="./caching">Caching</a> |
<a style="color: white; font-weight: normal; font-size: 0.75em; text-decoration: none;" id="github_link" href="https://github.com/aunefyren/plex-wrapped" target="_blank">GitHub</a>
</div>
</div>
<div class="content" id="search_results">
</div>
<script type="text/javascript">
var root = "./";
var link_mode = false;
var results;
var functions;
$(document).ready(function() {
var url_string = window.location.href
var url = new URL(url_string);
var hash = url.searchParams.get("hash");
var close_me = url.searchParams.get("close_me");
get_plex_wrapped_version();
if(close_me !== null) {
window.close();
}
if(hash !== null) {
link_mode = true;
wrapped_link_actions(hash);
document.getElementById('intro_text').innerHTML = '';
document.getElementById('stats').innerHTML = '<img id="loading_icon" src="assets/loading.gif" style="border-radius: 25px; background-color: white; padding: 1em;width: 4em; height: 4em; display:block; margin: auto;">';;
} else {
cookie_login_actions();
}
});
</script>
</body>
</html>