alertmanager/ui/app/index.html
Christian Hoffmann 0e63715b23 UI: Fix JavaScript error in MSIE due to endswith() usage (#1172)
* index: avoid endswith() for MSIE compatibility

MSIE does not support endswith() [1]. substr() can
be used to work around this limitation.

[1] https://docs.microsoft.com/en-us/scripting/javascript/reference/endswith-method-string-javascript

* index: clean up comment

* ui: update bindata
2018-01-02 14:25:54 +01:00

26 lines
1009 B
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Alertmanager</title>
</head>
<body>
<script>
// If there is no trailing slash at the end of the path in the url,
// add one. This ensures assets like script.js are loaded properly
if (window.location.pathname.substr(-1) != '/') {
window.location.pathname = window.location.pathname + '/';
console.log('added slash');
}
</script>
<script src="script.js"></script>
<script>
var app = Elm.Main.embed(document.body, { production: true, defaultCreator: window.localStorage.getItem('defaultCreator') });
app.ports.persistDefaultCreator.subscribe(function(name) {
window.localStorage.setItem('defaultCreator', name);
});
</script>
</body>
</html>