I’m using Dark Reader extension but still I’m whiteflashed when loading pages.

  • Victor@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    22 天前

    By the way,

    const block = document.getElementById('antiFOUC-block')
    

    Is this necessary? Isn’t there a reference to this node already via the style identifier?

    • jutty@blendit.bsd.cafe
      link
      fedilink
      arrow-up
      1
      ·
      22 天前

      I guess, but:

      1. my JS skills are horrific
      2. I have a habit of avoiding all outer and/or global state like the plague
      • Victor@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        22 天前
        1. Fair enough 😁
        2. IMO it’s more of a closure than global state, since this is an isolated function/IIFE. 👍 But it’s up to you! 😊