// decode incoming json data
let decodedText = decodeURIComponent(params);
let data = JSON.parse(decodedText);
// update SPX with received data
document.getElementById('f0').innerHTML = data.displayName;
document.getElementById('f1').innerHTML = data.message;
document.getElementById('f2').src = data.profileImageUrl;
Usage: usage: append following parameters to dock.html: spxserver=http://xxxxxxxx/:80&spxfunction=myCustomFunction&spxlayer=11
SPX templates can use the data like this:
// decode incoming json data let decodedText = decodeURIComponent(params); let data = JSON.parse(decodedText);
// update SPX with received data document.getElementById('f0').innerHTML = data.displayName; document.getElementById('f1').innerHTML = data.message; document.getElementById('f2').src = data.profileImageUrl;
The following data is also available:
data.platform.name data.platform.logoUrl
More can be added by request