diff options
author | Ciaran Gallagher <[email protected]> | 2019-12-02 21:26:10 +0000 |
---|---|---|
committer | Ciaran Gallagher <[email protected]> | 2019-12-02 21:26:10 +0000 |
commit | 699c5e0dcdceb3028fd67c08eb0ecb1c801de8f6 (patch) | |
tree | c72a6fde4e438c7eda7c22c587c8d66e35578b1e /js | |
parent | 50747e470e7965da605a9ac5a1470c780c657712 (diff) | |
download | pasta-699c5e0dcdceb3028fd67c08eb0ecb1c801de8f6.tar.gz pasta-699c5e0dcdceb3028fd67c08eb0ecb1c801de8f6.zip |
Mobile Styling and Input protection
Diffstat (limited to 'js')
-rw-r--r-- | js/main.js | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -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/`, |