CK snippet - tamer1an/node-red-contrib-github GitHub Wiki

x = $('.markdown-body').children[0].children;

async function process() {
  let counter = 0;
  for (item of x) {
   const ck = document.createElement('input', { type: 'checkbox' });
   ck.type = 'checkbox';
   ck.name = item.textContent;
   ck.dataset.item = item;
   item.prepend(ck);
   ck.addEventListener('click', ({ target }) => {
     localStorage.setItem(target.name, target.getAttribute('checked'));
   });
    
//    if (counter % 500) {
     await new Promise(r => setTimeout(() => r(), 300));  
     console.count("func")
//    } 
  }
}

process();