aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--index.html5
-rw-r--r--js/main.js17
2 files changed, 17 insertions, 5 deletions
diff --git a/index.html b/index.html
index 8f76e95..5cb292c 100644
--- a/index.html
+++ b/index.html
@@ -185,13 +185,14 @@
<strong>Warning:</strong> You have loaded this page over <strong>http</strong>, which means that this may not be secure, especially if you are using public or untrusted networks.
<br>If you can only access your Plex server via http, then please continue with caution.
<br>However, if you can access your Plex server via <strong>https</strong>, then I recommend reloading this site over https by <strong><a href="https://www.pastatool.com">clicking here</a></strong>.
+ <br><a href="javascript:void(0)" onclick="hideAlertForever()">Never show this warning again</a>
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="form-group">
<label for="plexUrl">Plex URL</label>
- <input type="email" class="form-control" id="plexUrl"
+ <input type="text" class="form-control" id="plexUrl"
placeholder="e.g. http://192.168.0.1:32400" autocomplete="on">
<small class="form-text text-muted">This must be a local server, or a server
publicly addressable.</small>
@@ -231,7 +232,7 @@
<div class="row mt-4">
<div class="col">
<h3>Plex Libraries</h3>
- <small>Choose <strong>only</strong> TV Shows. This will not work for Movies.</small>
+ <small>Choose <strong>only</strong> episodic content (TV Shows, Anime, etc). This does not work for Movies.</small>
<div class="table-responsive">
<table id="libraryTable" class="table table-hover mt-3">
<thead>
diff --git a/js/main.js b/js/main.js
index ff9185e..b78afb4 100644
--- a/js/main.js
+++ b/js/main.js
@@ -12,7 +12,12 @@ $(document).ready(() => {
// Check if the page was loaded locally or over http and warn them about the value of https
if ((location.protocol == "http:") || (location.protocol == "file:")) {
- $("#insecureWarning").show();
+ if (localStorage.showHttpAlert == 'false') {
+
+ }
+ else {
+ $("#insecureWarning").show();
+ }
}
// Validation values to enable the Connect to Plex Button
@@ -79,8 +84,14 @@ function forgetDetails() {
});
}
+function hideAlertForever() {
+ $("#insecureWarning").hide();
+ localStorage.showHttpAlert = 'false';
+}
+
function connectToPlex() {
- plexUrl = $("#plexUrl").val().trim();
+ plexUrl = $("#plexUrl").val().trim().replace(/\/+$/, '');
+ console.log(plexUrl);
plexToken = $("#plexToken").val().trim();
if (plexUrl.toLowerCase().indexOf("http") < 0) {
@@ -117,7 +128,7 @@ function connectToPlex() {
console.log("Trying to use http over a https site");
$("#authWarningText").html(`<div class="alert alert-warning alert-dismissible fade show mt-3" role="alert">
<strong>Warning:</strong> Error - You are trying to access a http server via the site in https. Please access your server via https, or load this site \
- over https by <a href="http://www.pastatool.com">clicking here</a>.
+ over http by <a href="http://www.pastatool.com">clicking here</a>.
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>