Skip to content

Commit

Permalink
Fixed a bug with fhemweb_url #219
Browse files Browse the repository at this point in the history
  • Loading branch information
knowthelist committed Feb 9, 2018
1 parent e34ebb4 commit 31f8cba
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions www/tablet/js/fhem-tablet-ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* UI builder framework for FHEM
*
* Version: 2.6.38
* Version: 2.6.39
*
* Copyright (c) 2015-2017 Mario Stephan <mstephan@shared-files.de>
* Under MIT License (http://www.opensource.org/licenses/mit-license.php)
Expand Down Expand Up @@ -350,7 +350,7 @@ var plugins = {

var ftui = {

version: '2.6.38',
version: '2.6.39',
config: {
DEBUG: false,
DEMO: false,
Expand Down Expand Up @@ -430,8 +430,8 @@ var ftui = {
ftui.log(1, 'Filename: ' + ftui.config.filename);
var fhemUrl = $("meta[name='fhemweb_url']").attr("content");
ftui.config.fhemDir = fhemUrl || location.origin + "/fhem/";
if (fhemUrl && new RegExp("(?!\/)").test(fhemUrl)) {
ftui.config.fhemDir = location.origin + "/" + ftui.config.fhemDir + "/";
if (fhemUrl && new RegExp("^((?!http:\/\/|https:\/\/).)*$").test(fhemUrl)) {
ftui.config.fhemDir = location.origin + "/" + fhemUrl + "/";
}
ftui.config.fhemDir = ftui.config.fhemDir.replace('///', '//');
ftui.log(1, 'FHEM dir: ' + ftui.config.fhemDir);
Expand Down
Loading

0 comments on commit 31f8cba

Please sign in to comment.