Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.
code-server/packages/web/src/index.html

38 lines
877 B
HTML
Raw Normal View History

2019-01-08 01:46:19 +01:00
<!DOCTYPE html>
<html lang="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>code-server</title>
</head>
<body style="background: rgb(30, 30, 30);">
<script>
(() => {
const rawColorTheme = localStorage.getItem("colorThemeData");
if (!rawColorTheme) {
return;
}
const colorTheme = JSON.parse(rawColorTheme);
const colorMap = colorTheme.colorMap;
if (!colorMap) {
return;
}
const bg = colorMap["editor.background"];
if (!bg) {
return;
}
document.body.style.background = bg;
})();
// Check that service workers are registered
if ("serviceWorker" in navigator) {
// Use the window load event to keep the page load performant
window.addEventListener("load", () => {
navigator.serviceWorker.register('service-worker.js', {scope: './'});
});
}
</script>
</body>
</html>