Meme transcription [Kid drowning in pool]

In the background a person plays with a kid in the pool. The person is labeled “Companies updating their website”. The kid is labeled “The company logo”.

In the foreground a kid seems to be drowning. It is labeled “Useful information”.

In a second panel a skeleton sits at the bottom of the pool. It is labeled “The copyright year”

  • konalt@lemmy.world
    link
    fedilink
    arrow-up
    20
    arrow-down
    1
    ·
    2 months ago

    document.querySelector('span#copyright_year').innerText = new Date().getFullYear()

    • bleistift2OP
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      2 months ago

      No need to specify the tag name in the selector if you’re going to use an ID anyway.

      • FooBarrington@lemmy.world
        link
        fedilink
        arrow-up
        5
        arrow-down
        1
        ·
        2 months ago

        Right - it should have been:

        document.querySelectorAll('span#copyright_year').forEach((el) => { el.innerText = new Date().getFullYear() })

        so that we update all spans with that ID!