aboutsummaryrefslogtreecommitdiffhomepage
path: root/js
diff options
context:
space:
mode:
authorCiaran Gallagher <[email protected]>2019-12-02 21:26:10 +0000
committerCiaran Gallagher <[email protected]>2019-12-02 21:26:10 +0000
commit699c5e0dcdceb3028fd67c08eb0ecb1c801de8f6 (patch)
treec72a6fde4e438c7eda7c22c587c8d66e35578b1e /js
parent50747e470e7965da605a9ac5a1470c780c657712 (diff)
downloadpasta-699c5e0dcdceb3028fd67c08eb0ecb1c801de8f6.tar.gz
pasta-699c5e0dcdceb3028fd67c08eb0ecb1c801de8f6.zip
Mobile Styling and Input protection
Diffstat (limited to 'js')
-rw-r--r--js/main.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/js/main.js b/js/main.js
index 8dd9799..ff34e77 100644
--- a/js/main.js
+++ b/js/main.js
@@ -51,8 +51,12 @@ $(document).ready(() => {
});
function connectToPlex() {
- plexUrl = $("#plexUrl").val();
- plexToken = $("#plexToken").val();
+ plexUrl = $("#plexUrl").val().trim();
+ plexToken = $("#plexToken").val().trim();
+
+ if (plexUrl.toLowerCase().indexOf("http") < 0) {
+ plexUrl = `http://${plexUrl}`
+ }
$.ajax({
"url": `${plexUrl}/library/sections/`,