Skip to content

Commit

Permalink
fix: run on http only (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbrodriguez authored Jan 12, 2024
1 parent 7e65046 commit d011249
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions meta/plugin/unbalanced.page
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ $unbalanced_version = shell_exec("cat /usr/local/emhttp/plugins/unbalanced/VERSI
?>

<script type="text/javascript">
var port = <?=$unbalanced_port;?>;
if (document.location.protocol === 'https:') {
var iport = +port + 1
port = iport.toString()
}
var url = document.location.protocol + '//' + document.location.hostname + ':' + port + '/';
// var port = <?=$unbalanced_port;?>;
// if (document.location.protocol === 'https:') {
// var iport = +port + 1
// port = iport.toString()
// }
// var url = document.location.protocol + '//' + document.location.hostname + ':' + port + '/';
var url = 'http://' + document.location.hostname + ':' + port + '/';
var isRunning = <?=$unbalanced_running;?> === 1;
var version = '<?=$unbalanced_version;?>';
if (isRunning) {
Expand Down

0 comments on commit d011249

Please sign in to comment.