Daily Shaarli

All links of one day in a single page.

May 2, 2023

Reusable UI Components Anti-Pattern, API Inheritance

I totally agree with it: I find composition a killer feature as it keeps the API of the component open.

Edward Loveall

Argument against Github that are mostly arguments against monopolies.

Client-side full-text search in CSS

Wow I didn't think about it. It seems practical!

With a list with data-index attributes such as <li class="searchable" data-index="newtoncronintorphy.dorothea@gmail.com(121)644-5577">
and the snippet:

<script type="text/javascript">
var searchStyle = document.getElementById('search_style');
document.getElementById('search').addEventListener('input', function() {
  if (!this.value) {
    searchStyle.innerHTML = "";
    return;
  }
  // look ma, no indexOf!
  searchStyle.innerHTML = ".searchable:not([data-index*=\"" + this.value.toLowerCase() + "\"]) { display: none; }";
  // beware of css injections!
});
</script>
Fuite de données : l’URSSAF diffuse des dizaines d’échéanciers aux mauvais destinataires

Aie, diffuser par erreurs des dizaines de coordonnées bancaires avec numéro SIRET, etc... c'est chaud.