Browse Source

Automatically fix problems with API URL

master
Skylar Ittner 4 years ago
parent
commit
20271883db
  1. 6
      www/js/setup.js

6
www/js/setup.js

@ -5,6 +5,12 @@
*/
function dlGroups() {
if (!$("#url").val().startsWith("http")) {
$("#url").val("https://" + $("#url").val());
}
if (!$("#url").val().endsWith("/api.php")) {
$("#url").val($("#url").val() + "/api.php");
}
localStorage.setItem("apiurl", $("#url").val());
localStorage.setItem("apikey", $("#key").val());
reloadSettings();

Loading…
Cancel
Save