loading...

re: GitHub ditched jQuery VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Lets be clear not everything needs to work without JS for a project to be a progressive enhancement success. The feed on GitHub might have been de...
 

For the feed thing, you can use something similar to EventSource infinite pipe. Eg:

.list {
  display: flex;
  flex-flow: column-reverse nowrap;
}
.list > .item:nth-last-of-type(n+16) {
  display: none;
}
let l, o = new MutationObserver(_=>{
  while (l.childElementCount > 64) 
    l.firstChild.remove();
});
requestAnimationFrame(function m(){
  l = document.querySelector(".list")
  if (l) o.observe(l, {
    childList: true,
    subtree: false,
    attributes: false
  });
  else requestAnimationFrame(m);
});

This is about the simplest one I can come up with btw. It's pretty dumb.

code of conduct - report abuse