pxt-calliope/win10/app/msapp-error.js
Peli de Halleux 17150e0d71 added uwp app
2016-04-07 20:48:00 -07:00

23 lines
910 B
JavaScript

(function () {
var validParameterNames = [ "httpStatus", "failureName", "failureUrl" ];
function parseQueryParameters() {
var query = location.search.slice(1);
return query.split("&").reduce(function (queryParameters, rawPair) {
var pair = rawPair.split("=").map(decodeURIComponent);
queryParameters[pair[0]] = pair[1];
return queryParameters;
}, {});
}
function initialize() {
var queryParameters = parseQueryParameters();
validParameterNames.forEach(function (parameterName) {
var parameterValue = queryParameters[parameterName] || "N/A";
document.getElementById(parameterName + "Value").textContent = parameterValue;
});
}
document.addEventListener("DOMContentLoaded", initialize);
}());