diff --git a/public/500.html b/public/500.html
index 46defe6d..5495427c 100644
--- a/public/500.html
+++ b/public/500.html
@@ -124,7 +124,7 @@
border-color: #B2B2B2;
}
- .fontsLoaded {
+ .fontsLoaded body {
font-family: sofiapro, Helvetica, Arial, sans-serif;
opacity: 1;
}
@@ -160,8 +160,19 @@
}
+
-
+
500
Sorry, it seems we did something wrong.
@@ -175,9 +186,15 @@
// Browsers that don't support FontFaceSet, will show only system fonts
if (document.fonts) {
+ // Check if Promise exists in window
+ var hasFeaturePromise = typeof window.Promise !== 'undefined' &&
+ typeof window.Promise.reject !== 'undefined' &&
+ Object.prototype.toString.call(Promise.resolve()) === '[object Promise]';
+
// Optimization for Repeated views - i.e. page refresh hits the same error
- if (sessionStorage.fontsLoaded) {
- document.getElementById("body").classList.add("fontsLoaded");
+ // If there's no Promise available, we also revert to @font-face loading
+ if (sessionStorage.fontsLoaded || !hasFeaturePromise) {
+ document.documentElement.classList.add("fontsLoaded");
return;
}
@@ -190,7 +207,7 @@
values.forEach(function(f) {
document.fonts.add(f);
});
- document.getElementById("body").classList.add("fontsLoaded");
+ document.documentElement.classList.add("fontsLoaded");
// Optimization for Repeat Views
sessionStorage.fontsLoaded = true;
diff --git a/public/index.html b/public/index.html
index 5ca08a00..7954e4ef 100644
--- a/public/index.html
+++ b/public/index.html
@@ -62,11 +62,76 @@
}
+
+
+