A place to cache linked articles (think custom and personal wayback machine)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.html 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. <!doctype html><!-- This is a valid HTML5 document. -->
  2. <!-- Screen readers, SEO, extensions and so on. -->
  3. <html lang="fr">
  4. <!-- Has to be within the first 1024 bytes, hence before the <title>
  5. See: https://www.w3.org/TR/2012/CR-html5-20121217/document-metadata.html#charset -->
  6. <meta charset="utf-8">
  7. <!-- Why no `X-UA-Compatible` meta: https://stackoverflow.com/a/6771584 -->
  8. <!-- The viewport meta is quite crowded and we are responsible for that.
  9. See: https://codepen.io/tigt/post/meta-viewport-for-2015 -->
  10. <meta name="viewport" content="width=device-width,initial-scale=1">
  11. <!-- Required to make a valid HTML5 document. -->
  12. <title>Articles archivés — David Larlet</title>
  13. <meta name="description" content="Lien vers les publications externes mises en cache.">
  14. <!-- That good ol' feed, subscribe :). -->
  15. <link rel="alternate" type="application/atom+xml" title="Feed" href="/david/log/">
  16. <!-- Generated from https://realfavicongenerator.net/ such a mess. -->
  17. <link rel="apple-touch-icon" sizes="180x180" href="/static/david/icons2/apple-touch-icon.png">
  18. <link rel="icon" type="image/png" sizes="32x32" href="/static/david/icons2/favicon-32x32.png">
  19. <link rel="icon" type="image/png" sizes="16x16" href="/static/david/icons2/favicon-16x16.png">
  20. <link rel="manifest" href="/static/david/icons2/site.webmanifest">
  21. <link rel="mask-icon" href="/static/david/icons2/safari-pinned-tab.svg" color="#07486c">
  22. <link rel="shortcut icon" href="/static/david/icons2/favicon.ico">
  23. <meta name="msapplication-TileColor" content="#f0f0ea">
  24. <meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
  25. <meta name="theme-color" content="#f0f0ea">
  26. <!-- Documented, feel free to shoot an email. -->
  27. <link rel="stylesheet" href="/static/david/css/style_2020-06-19.css">
  28. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  29. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  30. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  31. <link rel="preload" href="/static/david/css/fonts/triplicate_t4_poly_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: light), (prefers-color-scheme: no-preference)" crossorigin>
  32. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  33. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  34. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  35. <script>
  36. function toggleTheme(themeName) {
  37. document.documentElement.classList.toggle(
  38. 'forced-dark',
  39. themeName === 'dark'
  40. )
  41. document.documentElement.classList.toggle(
  42. 'forced-light',
  43. themeName === 'light'
  44. )
  45. }
  46. const selectedTheme = localStorage.getItem('theme')
  47. if (selectedTheme !== 'undefined') {
  48. toggleTheme(selectedTheme)
  49. }
  50. </script>
  51. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick">
  52. <header>
  53. <h1>Articles archivés</h1>
  54. </header>
  55. <nav>
  56. <p class="center">
  57. <a href="/david/" title="Aller à l’accueil">🏠</a>
  58. </p>
  59. </nav>
  60. <hr>
  61. <main>
  62. <ul>
  63. <li><a href="/david/cache/2020/c8678419b1c96d90ea066a3f6f6e3479/" title="Accès à l’article dans le cache local : When Are We Back To Normal?">When Are We Back To Normal?</a> (<a href="https://inessential.com/2020/12/31/when_are_we_back_to_normal" title="Accès à l’article original distant : When Are We Back To Normal?">original</a>)</li>
  64. <li><a href="/david/cache/2020/94923f2d3ecd28b40745665c9cbe8393/" title="Accès à l’article dans le cache local : Un février artistique !">Un février artistique !</a> (<a href="https://artfevre.notmyidea.org/" title="Accès à l’article original distant : Un février artistique !">original</a>)</li>
  65. <li><a href="/david/cache/2020/ab9f293c34ce421ab41465fcda8893fe/" title="Accès à l’article dans le cache local : Whistleblower Says Facebook Ignored Global Political Manipulation">Whistleblower Says Facebook Ignored Global Political Manipulation</a> (<a href="https://www.buzzfeednews.com/article/craigsilverman/facebook-ignore-political-manipulation-whistleblower-memo" title="Accès à l’article original distant : Whistleblower Says Facebook Ignored Global Political Manipulation">original</a>)</li>
  66. <li><a href="/david/cache/2020/3d37e77a601b6dd7043bbb17a4a2d199/" title="Accès à l’article dans le cache local : Le compromis de la vulgarisation">Le compromis de la vulgarisation</a> (<a href="https://tanialouis.fr/2020/12/27/le-compromis-de-la-vulgarisation/" title="Accès à l’article original distant : Le compromis de la vulgarisation">original</a>)</li>
  67. <li><a href="/david/cache/2020/9c9968045ffe697a08dc13df854247f1/" title="Accès à l’article dans le cache local : I should have loved biology">I should have loved biology</a> (<a href="https://jsomers.net/i-should-have-loved-biology/" title="Accès à l’article original distant : I should have loved biology">original</a>)</li>
  68. <li><a href="/david/cache/2020/66ef8e7fa0942fc975723f7df4d932e9/" title="Accès à l’article dans le cache local : Reverse Engineering the source code of the BioNTech/Pfizer SARS-CoV-2 Vaccine">Reverse Engineering the source code of the BioNTech/Pfizer SARS-CoV-2 Vaccine</a> (<a href="https://berthub.eu/articles/posts/reverse-engineering-source-code-of-the-biontech-pfizer-vaccine/" title="Accès à l’article original distant : Reverse Engineering the source code of the BioNTech/Pfizer SARS-CoV-2 Vaccine">original</a>)</li>
  69. <li><a href="/david/cache/2020/e2bbd325581e7ec27b5c8e92ca32ce69/" title="Accès à l’article dans le cache local : Covid 'Long-Haulers' Need Medical Attention, Experts Urge">Covid 'Long-Haulers' Need Medical Attention, Experts Urge</a> (<a href="https://www.nytimes.com/2020/12/04/health/covid-long-term-symptoms.html" title="Accès à l’article original distant : Covid 'Long-Haulers' Need Medical Attention, Experts Urge">original</a>)</li>
  70. <li><a href="/david/cache/2020/5f4b0220be54d83f711a78b356c73a68/" title="Accès à l’article dans le cache local : Carnets Web de La Grange">Carnets Web de La Grange</a> (<a href="https://www.la-grange.net/2021/01/05/newsletter" title="Accès à l’article original distant : Carnets Web de La Grange">original</a>)</li>
  71. <li><a href="/david/cache/2020/3159c32fa194458a63b546ab789e8aed/" title="Accès à l’article dans le cache local : The world needs a tech diet; here is how designers can help">The world needs a tech diet; here is how designers can help</a> (<a href="https://essays.uxdesign.cc/tech-diet/" title="Accès à l’article original distant : The world needs a tech diet; here is how designers can help">original</a>)</li>
  72. <li><a href="/david/cache/2020/b19c86fa9c66389e26495165b442d0c0/" title="Accès à l’article dans le cache local : L’emprise de la machine : une critique décroissanciste de la domination technique">L’emprise de la machine : une critique décroissanciste de la domination technique</a> (<a href="https://polemos-decroissance.org/lemprise-de-la-machine-une-critique-decroissanciste-de-la-domination-technique/" title="Accès à l’article original distant : L’emprise de la machine : une critique décroissanciste de la domination technique">original</a>)</li>
  73. <li><a href="/david/cache/2020/1cb1c46e0a1adcd0917179a214a16e0a/" title="Accès à l’article dans le cache local : DNA seen through the eyes of a coder (or, If you are a hammer, everything looks like a nail)">DNA seen through the eyes of a coder (or, If you are a hammer, everything looks like a nail)</a> (<a href="https://berthub.eu/articles/posts/amazing-dna/" title="Accès à l’article original distant : DNA seen through the eyes of a coder (or, If you are a hammer, everything looks like a nail)">original</a>)</li>
  74. <li><a href="/david/cache/2020/765e28efb1fa6aa0dc9c15166f66cdf3/" title="Accès à l’article dans le cache local : How Silicon Valley, in a Show of Monopolistic Force, Destroyed Parler">How Silicon Valley, in a Show of Monopolistic Force, Destroyed Parler</a> (<a href="https://greenwald.substack.com/p/how-silicon-valley-in-a-show-of-monopolistic" title="Accès à l’article original distant : How Silicon Valley, in a Show of Monopolistic Force, Destroyed Parler">original</a>)</li>
  75. <li><a href="/david/cache/2020/352d2966ecda7a68cbf97efbc691d017/" title="Accès à l’article dans le cache local : Facebook’s Unknowable Megascale">Facebook’s Unknowable Megascale</a> (<a href="https://daringfireball.net/2020/12/facebook_unknowable_megascale" title="Accès à l’article original distant : Facebook’s Unknowable Megascale">original</a>)</li>
  76. <li><a href="/david/cache/2020/99c13c692ec7f2217311fdea482e8792/" title="Accès à l’article dans le cache local : Newsletters">Newsletters</a> (<a href="https://www.robinrendle.com/essays/newsletters" title="Accès à l’article original distant : Newsletters">original</a>)</li>
  77. <li><a href="/david/cache/2020/dcba97f9e4bd70b1a152b9498dc5711c/" title="Accès à l’article dans le cache local : Risk: micromorts, microCOVIDs, and skydiving">Risk: micromorts, microCOVIDs, and skydiving</a> (<a href="http://interconnected.org/home/2020/09/01/microcovids" title="Accès à l’article original distant : Risk: micromorts, microCOVIDs, and skydiving">original</a>)</li>
  78. <li><a href="/david/cache/2020/e8ebcfcc0dbd4336a82f618a1bd1a818/" title="Accès à l’article dans le cache local : DNA Chisel - a versatile sequence optimizer">DNA Chisel - a versatile sequence optimizer</a> (<a href="https://edinburgh-genome-foundry.github.io/DnaChisel/" title="Accès à l’article original distant : DNA Chisel - a versatile sequence optimizer">original</a>)</li>
  79. <li><a href="/david/cache/2020/388cf40eae756175ee87c9bf7a1548c4/" title="Accès à l’article dans le cache local : No, Really, mRNA Vaccines Are Not Going To Affect Your DNA">No, Really, mRNA Vaccines Are Not Going To Affect Your DNA</a> (<a href="https://www.deplatformdisease.com/blog/no-really-mrna-vaccines-are-not-going-to-affect-your-dna" title="Accès à l’article original distant : No, Really, mRNA Vaccines Are Not Going To Affect Your DNA">original</a>)</li>
  80. <li><a href="/david/cache/2020/fe75ef80663602733dbe24cc717f257b/" title="Accès à l’article dans le cache local : The race for coronavirus vaccines: a graphical guide">The race for coronavirus vaccines: a graphical guide</a> (<a href="https://www.nature.com/articles/d41586-020-01221-y" title="Accès à l’article original distant : The race for coronavirus vaccines: a graphical guide">original</a>)</li>
  81. <li><a href="/david/cache/2020/22172cf6d8f4f1e910ed6599b3557c8a/" title="Accès à l’article dans le cache local : Les élevages de visons en Chine à l’origine du Covid-19 ? Les indices s’accumulent">Les élevages de visons en Chine à l’origine du Covid-19 ? Les indices s’accumulent</a> (<a href="https://reporterre.net/Les-elevages-de-visons-en-Chine-a-l-origine-du-Covid-19-Les-indices-s-accumulent" title="Accès à l’article original distant : Les élevages de visons en Chine à l’origine du Covid-19 ? Les indices s’accumulent">original</a>)</li>
  82. <li><a href="/david/cache/2020/837e11a57aa3ddcba084963c247f45a6/" title="Accès à l’article dans le cache local : What Is Going To Happen In 2021">What Is Going To Happen In 2021</a> (<a href="https://avc.com/2021/01/what-is-going-to-happen-in-2021/" title="Accès à l’article original distant : What Is Going To Happen In 2021">original</a>)</li>
  83. <li><a href="/david/cache/2020/21d3daabe37170d236d2714df3b872fb/" title="Accès à l’article dans le cache local : Free and Open Source RSS Reader for Mac and iOS">Free and Open Source RSS Reader for Mac and iOS</a> (<a href="https://netnewswire.com/" title="Accès à l’article original distant : Free and Open Source RSS Reader for Mac and iOS">original</a>)</li>
  84. <li><a href="/david/cache/2020/1ac1db00072c35c5f6de8d729331b8d4/" title="Accès à l’article dans le cache local : Reconnexion ?">Reconnexion ?</a> (<a href="https://blog.notmyidea.org/reconnexion.html" title="Accès à l’article original distant : Reconnexion ?">original</a>)</li>
  85. <li><a href="/david/cache/2020/1039b631578007d23759a99c2238cda9/" title="Accès à l’article dans le cache local : Biohacking Lite">Biohacking Lite</a> (<a href="https://karpathy.github.io/2020/06/11/biohacking-lite/" title="Accès à l’article original distant : Biohacking Lite">original</a>)</li>
  86. <li><a href="/david/cache/2020/3d3e8962a6319ee4d41a75b1cd5abd38/" title="Accès à l’article dans le cache local : How the novel coronavirus has evolved">How the novel coronavirus has evolved</a> (<a href="https://graphics.reuters.com/HEALTH-CORONAVIRUS/EVOLUTION/yxmpjqkdzvr/index.html" title="Accès à l’article original distant : How the novel coronavirus has evolved">original</a>)</li>
  87. <li><a href="/david/cache/2020/5f1c22e9a41d209ff84218b3d6faf676/" title="Accès à l’article dans le cache local : Reverse Engineering Source Code of the Biontech Pfizer Vaccine: Part 2">Reverse Engineering Source Code of the Biontech Pfizer Vaccine: Part 2</a> (<a href="https://berthub.eu/articles/posts/part-2-reverse-engineering-source-code-of-the-biontech-pfizer-vaccine/" title="Accès à l’article original distant : Reverse Engineering Source Code of the Biontech Pfizer Vaccine: Part 2">original</a>)</li>
  88. <li><a href="/david/cache/2020/f1df3d5f1720e137130581d5a2b8549f/" title="Accès à l’article dans le cache local : Built to Last">Built to Last</a> (<a href="https://logicmag.io/care/built-to-last/" title="Accès à l’article original distant : Built to Last">original</a>)</li>
  89. <li><a href="/david/cache/2020/46b31e34a075d66aa6e4b8d8c91bd535/" title="Accès à l’article dans le cache local : Almost a third of recovered Covid patients return to hospital in five months and one in eight die">Almost a third of recovered Covid patients return to hospital in five months and one in eight die</a> (<a href="https://www.telegraph.co.uk/news/2021/01/17/almost-third-recovered-covid-patients-return-hospital-five-months/" title="Accès à l’article original distant : Almost a third of recovered Covid patients return to hospital in five months and one in eight die">original</a>)</li>
  90. <li><a href="/david/cache/2020/78f2e167938eb4bfa6747503aefe45c1/" title="Accès à l’article dans le cache local : We Quit Our Jobs to Build a Cabin-Everything Went Wrong">We Quit Our Jobs to Build a Cabin-Everything Went Wrong</a> (<a href="https://www.outsideonline.com/2415766/friends-diy-cabin-build-washington" title="Accès à l’article original distant : We Quit Our Jobs to Build a Cabin-Everything Went Wrong">original</a>)</li>
  91. <li><a href="/david/cache/2020/28242a5ba209770efabfdbe5a6718719/" title="Accès à l’article dans le cache local : Des chasseurs massacrent sadiquement des sangliers à l’arme blanche">Des chasseurs massacrent sadiquement des sangliers à l’arme blanche</a> (<a href="https://reporterre.net/Des-chasseurs-massacrent-sadiquement-des-sangliers-a-l-arme-blanche" title="Accès à l’article original distant : Des chasseurs massacrent sadiquement des sangliers à l’arme blanche">original</a>)</li>
  92. <li><a href="/david/cache/2020/fd776407232cd6fd7627bac7dba39755/" title="Accès à l’article dans le cache local : Épuiser la pratique">Épuiser la pratique</a> (<a href="https://www.quaternum.net/2020/02/29/epuiser-la-pratique/" title="Accès à l’article original distant : Épuiser la pratique">original</a>)</li>
  93. <li><a href="/david/cache/2020/ef2067bf42482ed7c48e1d166cde117a/" title="Accès à l’article dans le cache local : Cameras and Lenses">Cameras and Lenses</a> (<a href="https://ciechanow.ski/cameras-and-lenses/" title="Accès à l’article original distant : Cameras and Lenses">original</a>)</li>
  94. <li><a href="/david/cache/2020/9e5d68c7459c77716c44dd1463be36d8/" title="Accès à l’article dans le cache local : Plaintext HTTP in a Modern World">Plaintext HTTP in a Modern World</a> (<a href="https://jcs.org/2021/01/06/plaintext" title="Accès à l’article original distant : Plaintext HTTP in a Modern World">original</a>)</li>
  95. <li><a href="/david/cache/2020/cfcd10768187ce1c3e598136cd8838b2/" title="Accès à l’article dans le cache local : Bad News Wrapped in Protein: Inside the Coronavirus Genome">Bad News Wrapped in Protein: Inside the Coronavirus Genome</a> (<a href="https://www.nytimes.com/interactive/2020/04/03/science/coronavirus-genome-bad-news-wrapped-in-protein.html" title="Accès à l’article original distant : Bad News Wrapped in Protein: Inside the Coronavirus Genome">original</a>)</li>
  96. <li><a href="/david/cache/2020/c177668b263f39d20788f002446d2a47/" title="Accès à l’article dans le cache local : 6-month consequences of COVID-19 in patients discharged from hospital: a cohort study">6-month consequences of COVID-19 in patients discharged from hospital: a cohort study</a> (<a href="https://www.thelancet.com/journals/lancet/article/PIIS0140-6736(20)32656-8/fulltext" title="Accès à l’article original distant : 6-month consequences of COVID-19 in patients discharged from hospital: a cohort study">original</a>)</li>
  97. <li><a href="/david/cache/2020/0c6966a8e9543b52c361ac6de68f08e4/" title="Accès à l’article dans le cache local : Understanding ProRAW">Understanding ProRAW</a> (<a href="https://blog.halide.cam/understanding-proraw-4eed556d4c54" title="Accès à l’article original distant : Understanding ProRAW">original</a>)</li>
  98. <li><a href="/david/cache/2020/aeb0a60038b91bf1fbbbd39b358366fb/" title="Accès à l’article dans le cache local : ☕️ Journal : Statu quo">☕️ Journal : Statu quo</a> (<a href="https://oncletom.io/2021/01/05/statu-quo/" title="Accès à l’article original distant : ☕️ Journal : Statu quo">original</a>)</li>
  99. <li><a href="/david/cache/2020/595df9c1f986df0678e4fc7d6aa34ef1/" title="Accès à l’article dans le cache local : Qui sont les dix auteurs de SF de la « Red Team » du ministère des Armées ?">Qui sont les dix auteurs de SF de la « Red Team » du ministère des Armées ?</a> (<a href="https://www.lepoint.fr/high-tech-internet/qui-sont-les-dix-auteurs-de-sf-de-la-red-team-du-ministere-des-armees-04-12-2020-2404230_47.php" title="Accès à l’article original distant : Qui sont les dix auteurs de SF de la « Red Team » du ministère des Armées ?">original</a>)</li>
  100. <li><a href="/david/cache/2020/883963a92bff6f5bd5ade883ae84bd3f/" title="Accès à l’article dans le cache local : Disrespectful Design-Users aren’t stupid or lazy">Disrespectful Design-Users aren’t stupid or lazy</a> (<a href="https://somehowmanage.com/2020/09/13/disrespectful-design-users-arent-stupid-or-lazy/" title="Accès à l’article original distant : Disrespectful Design-Users aren’t stupid or lazy">original</a>)</li>
  101. <li><a href="/david/cache/2020/2057ddcf3fd20edd602cee1b08ac17e8/" title="Accès à l’article dans le cache local : Designing Branch: Sustainable Interaction Design Principles">Designing Branch: Sustainable Interaction Design Principles</a> (<a href="https://branch.climateaction.tech/2020/10/15/designing-branch-sustainable-interaction-design-principles/" title="Accès à l’article original distant : Designing Branch: Sustainable Interaction Design Principles">original</a>)</li>
  102. <li><a href="/david/cache/2020/44064d714aff0deac9f882cc429d8b9d/" title="Accès à l’article dans le cache local : Some rambling thoughts about the stuttering end of the last ice age and what lockdown means">Some rambling thoughts about the stuttering end of the last ice age and what lockdown means</a> (<a href="http://interconnected.org/home/2020/04/20/continuous_partial_lockdown" title="Accès à l’article original distant : Some rambling thoughts about the stuttering end of the last ice age and what lockdown means">original</a>)</li>
  103. <li><a href="/david/cache/2020/30069f97e4aa989a1d89fe8d88538da8/" title="Accès à l’article dans le cache local : We Had the COVID-19 Vaccine the Whole Time">We Had the COVID-19 Vaccine the Whole Time</a> (<a href="https://nymag.com/intelligencer/2020/12/moderna-covid-19-vaccine-design.html" title="Accès à l’article original distant : We Had the COVID-19 Vaccine the Whole Time">original</a>)</li>
  104. </ul>
  105. </main>
  106. <hr>
  107. <footer>
  108. <p>
  109. <a href="/david/" title="Aller à l’accueil">🏠</a> •
  110. <a href="/david/log/" title="Accès au flux RSS">🤖</a> •
  111. <a href="http://larlet.com" title="Go to my English profile" data-instant>🇨🇦</a> •
  112. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel">📮</a> •
  113. <abbr title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340">🧚</abbr>
  114. </p>
  115. <template id="theme-selector">
  116. <form>
  117. <fieldset>
  118. <legend>Thème</legend>
  119. <label>
  120. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  121. </label>
  122. <label>
  123. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  124. </label>
  125. <label>
  126. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  127. </label>
  128. </fieldset>
  129. </form>
  130. </template>
  131. </footer>
  132. <script>
  133. function loadThemeForm(templateName) {
  134. const themeSelectorTemplate = document.querySelector(templateName)
  135. const form = themeSelectorTemplate.content.firstElementChild
  136. themeSelectorTemplate.replaceWith(form)
  137. form.addEventListener('change', (e) => {
  138. const chosenColorScheme = e.target.value
  139. localStorage.setItem('theme', chosenColorScheme)
  140. toggleTheme(chosenColorScheme)
  141. })
  142. const selectedTheme = localStorage.getItem('theme')
  143. if (selectedTheme && selectedTheme !== 'undefined') {
  144. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  145. }
  146. }
  147. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  148. window.addEventListener('load', () => {
  149. let hasDarkRules = false
  150. for (const styleSheet of Array.from(document.styleSheets)) {
  151. let mediaRules = []
  152. for (const cssRule of styleSheet.cssRules) {
  153. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  154. continue
  155. }
  156. // WARNING: Safari does not have/supports `conditionText`.
  157. if (cssRule.conditionText) {
  158. if (cssRule.conditionText !== prefersColorSchemeDark) {
  159. continue
  160. }
  161. } else {
  162. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  163. continue
  164. }
  165. }
  166. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  167. }
  168. // WARNING: do not try to insert a Rule to a styleSheet you are
  169. // currently iterating on, otherwise the browser will be stuck
  170. // in a infinite loop…
  171. for (const mediaRule of mediaRules) {
  172. styleSheet.insertRule(mediaRule.cssText)
  173. hasDarkRules = true
  174. }
  175. }
  176. if (hasDarkRules) {
  177. loadThemeForm('#theme-selector')
  178. }
  179. })
  180. </script>
  181. </body>
  182. </html>