Init
This commit is contained in:
commit
39073d8f3a
15 changed files with 297 additions and 0 deletions
18
snapcast/data/config.js
Normal file
18
snapcast/data/config.js
Normal file
|
@ -0,0 +1,18 @@
|
|||
"use strict";
|
||||
|
||||
let base_url = window.location.pathname.replace(/\/$/, '');
|
||||
|
||||
let config = {
|
||||
baseUrl: (window.location.protocol === 'https:' ? 'wss://' : 'ws://') + window.location.host + base_url,
|
||||
};
|
||||
|
||||
|
||||
window.addEventListener("DOMContentLoaded", (event) => {
|
||||
let mopidy_link = document.createElement('a');
|
||||
//mopidy_link.href = window.location.protocol + '//' + window.location.host + base_url + '/mobile/';
|
||||
mopidy_link.href = window.location.protocol + '//' + window.location.hostname + ':6680/mobile/';
|
||||
mopidy_link.target = '_blank';
|
||||
mopidy_link.innerHTML = 'Mopidy';
|
||||
|
||||
document.getElementById('show').parentNode.appendChild(mopidy_link);
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue