-
Notifications
You must be signed in to change notification settings - Fork 43
/
index.html
executable file
·159 lines (134 loc) · 5.12 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
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="shortcut icon" type="image/x-icon" href="plexlanding.ico" />`
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<style>
body.offline #link-bar {
display:none;
}
body.online #link-bar{
display:block;
}
</style>
<script src="assets/js/ping.js"></script>
<script type='text/javascript'>
HTMLElement.prototype.hasClass = function (className) {
if (this.classList) {
return this.classList.contains(className);
} else {
return (-1 < this.className.indexOf(className));
}
};
HTMLElement.prototype.addClass = function (className) {
if (this.classList) {
this.classList.add(className);
} else if (!this.hasClass(className)) {
var classes = this.className.split(" ");
classes.push(className);
this.className = classes.join(" ");
}
return this;
};
HTMLElement.prototype.removeClass = function (className) {
if (this.classList) {
this.classList.remove(className);
} else {
var classes = this.className.split(" ");
classes.splice(classes.indexOf(className), 1);
this.className = classes.join(" ");
}
return this;
};
function checkServer() {
var p = new Ping();
var server = document.domain; //Try to get it automagically, but you can manually specify this
var timeout = 2000; //Milliseconds
var body = document.getElementsByTagName("body")[0];
p.ping(server+":32400", function(data) {
var serverMsg = document.getElementById( "server-status-msg" );
var serverImg = document.getElementById( "server-status-img" );
if (data < 1000){
serverMsg.innerHTML ='Up and reachable';
serverImg.src = "assets/img/ipad-hand-on.png";
body.addClass('online').removeClass("offline");
}else{
serverMsg.innerHTML = 'Down and unreachable';
serverImg.src = "assets/img/ipad-hand-off.png";
}
}, timeout);
}
</script>
<title>YOUR SERVER NAME HERE</title>
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.css" rel="stylesheet">
<!-- Custom styles -->
<link href="assets/css/main.css" rel="stylesheet">
<!-- Fonts from Google Fonts -->
<link href='//fonts.googleapis.com/css?family=Lato:300,400,900' rel='stylesheet' type='text/css'>
</head>
<body onload="checkServer()" class="offline">
<!-- Fixed navbar -->
<div class="navbar navbar-default navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<a href="http://YOURSERVERURLHERE.com">
<a class="navbar-brand" href="#"><b>YOUR SERVER NAME HERE</b></a>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container" id="link-bar">
<div class="row mt centered">
<div class="col-lg-6 col-lg-offset-3">
</div>
</div><!-- /row -->
<div class="row mt centered">
<div class="col-lg-4">
<a href="http://app.plex.tv/web/app" target="_top">
<img src="assets/img/s01.png" width="180" alt="">
<h4>Access YOUR SERVER NAME HERE</h4>
<p>Access the YOUR SERVER NAME HERE library with over X Movies & X TV Shows available instantly.<p>
</a>
</div><!--/col-lg-4 -->
<div class="col-lg-4">
<a href="PLEXREQUESTS LINK HERE" target="_top">
<img src="assets/img/s02.png" width="180" alt="">
<h4>Request</h4>
<p>Want to watch a Movie or TV Show but it's not currently on YOUR SERVER NAME HERE? Request it here!</p>
</a>
</div><!--/col-lg-4 -->
<div class="col-lg-4">
<a href="PLEXEMAIL LINK HERE" target="_top">
<img src="assets/img/s03.png" width="180" alt="">
<h4>What's New</h4>
<p>See what has been recently added to YOUR SERVER NAME HERE without having to log in.</p>
</a>
</div><!--/col-lg-4 -->
</div><!-- /row -->
</div><!-- /container -->
<p>
<div id="headerwrap">
<div class="container">
<div class="row">
<div class="col-lg-6">
<h1><br/>
<center>YOUR SERVER NAME HERE Status:</h1></center>
<center><h4 id="server-status-msg"><img src="assets/img/puff.svg"> Checking...</h4></center><br/>
<br/>
<br/>
<form class="form-inline" role="form">
<div class="form-group">
</div>
</div><!-- /col-lg-6 -->
<div class="col-lg-6">
<img id="server-status-img" class="img-responsive" src="assets/img/ipad-hand.png" alt="">
</div><!-- /col-lg-6 -->
</div><!-- /row -->
</div><!-- /container -->
</div><!-- /headerwrap -->
</body>
</html>