Skip to content

Instantly share code, notes, and snippets.

@mewmew
Forked from veggiedefender/CANCEL_THE_ICE_CONTRACT.jpg
Created March 1, 2021 20:24
Show Gist options
  • Star 37 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save mewmew/510801ff9024f833c4967c8a922d1a05 to your computer and use it in GitHub Desktop.
Save mewmew/510801ff9024f833c4967c8a922d1a05 to your computer and use it in GitHub Desktop.

Ten seconds to ponder if a thread is worth it

recording

A userstyle that makes you wait ten seconds before entering a Hacker News thread. I use stylus to manage mine.

.subtext {
  display: inline-block;
  background: linear-gradient(to left, transparent 50%, #f60 50%) right;
  background-position: 100% 0%;
  background-size: 200%;
  transition: background 0.2s;
}

.subtext:hover {
  background-position: left;
  transition: background 10s linear;
}

.subtext a[href^="item"] {
  pointer-events: none;
}

.subtext:hover a[href^="item"] {
  animation: enable-click 10.01s forwards;
}

/* workaround because pointer-events is not animatable */
@keyframes enable-click {
  0% {
    pointer-events: none;
  }

  99% {
    pointer-events: none;
  }

  100% {
    pointer-events: auto;
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment