
var themes = [
  "faded",
  "grayscale",
  "sepia",
  "wide-blur",
  "overexposed",
  "flip-hue",
  "none"
];

function defaultTheme() {
  return "faded";
}

document.body.classList.add("ugly-http-status-loaded");
if (!window.isSecureContext) {
  chrome.storage.local.get({
    theme: "default"
  }, function(items) {
    var theme = items.theme;
    if (themes.indexOf(theme) === -1) {
      theme = defaultTheme();
    }

    document.body.classList.add("ugly-http-theme-" + theme);
  });
}


var themes = [
  "faded",
  "grayscale",
  "sepia",
  "wide-blur",
  "overexposed",
  "flip-hue",
  "none"
];

function defaultTheme() {
  return "faded";
}

if (!window.isSecureContext) {
  chrome.storage.local.get({
    theme: "default"
  }, function(items) {
    var theme = items.theme;
    if (themes.indexOf(theme) === -1) {
      theme = defaultTheme();
    }

    document.body.classList.add("ugly-http-theme-" + theme);
  });
}
setTimeout(function() {
document.body.classList.add("ugly-http-status-loaded");
}, 10);

Remove loading dimmer briefly *after* applying theme.
Remove loading dimmer briefly *after* applying theme.

Otherwise, the page can briefly flash in full color before the theme is applied.
