A place to cache linked articles (think custom and personal wayback machine)
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

index.html 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. <!doctype html><!-- This is a valid HTML5 document. -->
  2. <!-- Screen readers, SEO, extensions and so on. -->
  3. <html lang="en">
  4. <!-- Has to be within the first 1024 bytes, hence before the `title` element
  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>Samsung caught faking zoom photos of the Moon (archive) — David Larlet</title>
  13. <meta name="description" content="Publication mise en cache pour en conserver une trace.">
  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="#f7f7f7">
  24. <meta name="msapplication-config" content="/static/david/icons2/browserconfig.xml">
  25. <meta name="theme-color" content="#f7f7f7" media="(prefers-color-scheme: light)">
  26. <meta name="theme-color" content="#272727" media="(prefers-color-scheme: dark)">
  27. <!-- Is that even respected? Retrospectively? What a shAItshow…
  28. https://neil-clarke.com/block-the-bots-that-feed-ai-models-by-scraping-your-website/ -->
  29. <meta name="robots" content="noai, noimageai">
  30. <!-- Documented, feel free to shoot an email. -->
  31. <link rel="stylesheet" href="/static/david/css/style_2021-01-20.css">
  32. <!-- See https://www.zachleat.com/web/comprehensive-webfonts/ for the trade-off. -->
  33. <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>
  34. <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>
  35. <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>
  36. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_regular.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  37. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_bold.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  38. <link rel="preload" href="/static/david/css/fonts/triplicate_t3_italic.woff2" as="font" type="font/woff2" media="(prefers-color-scheme: dark)" crossorigin>
  39. <script>
  40. function toggleTheme(themeName) {
  41. document.documentElement.classList.toggle(
  42. 'forced-dark',
  43. themeName === 'dark'
  44. )
  45. document.documentElement.classList.toggle(
  46. 'forced-light',
  47. themeName === 'light'
  48. )
  49. }
  50. const selectedTheme = localStorage.getItem('theme')
  51. if (selectedTheme !== 'undefined') {
  52. toggleTheme(selectedTheme)
  53. }
  54. </script>
  55. <meta name="robots" content="noindex, nofollow">
  56. <meta content="origin-when-cross-origin" name="referrer">
  57. <!-- Canonical URL for SEO purposes -->
  58. <link rel="canonical" href="https://www.theverge.com/2023/3/13/23637401/samsung-fake-moon-photos-ai-galaxy-s21-s23-ultra">
  59. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick" data-instant-intensity="viewport-all">
  60. <article>
  61. <header>
  62. <h1>Samsung caught faking zoom photos of the Moon</h1>
  63. </header>
  64. <nav>
  65. <p class="center">
  66. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  67. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  68. </svg> Accueil</a> •
  69. <a href="https://www.theverge.com/2023/3/13/23637401/samsung-fake-moon-photos-ai-galaxy-s21-s23-ultra" title="Lien vers le contenu original">Source originale</a>
  70. <br>
  71. Mis en cache le 2024-01-13
  72. </p>
  73. </nav>
  74. <hr>
  75. <div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">For years, Samsung “Space Zoom”-capable phones have been known for their ability to <a href="https://www.gsmarena.com/samsung_teases_epic_nights_and_moon_photography_with_the_s23_ultras_cameras-news-57304.php">take incredibly detailed photos of the Moon</a>. But a recent Reddit post <a href="https://www.reddit.com/r/Android/comments/11nzrb0/samsung_space_zoom_moon_shots_are_fake_and_here/">showed in stark terms</a> just how much computational processing the company is doing, and — given the evidence supplied — it feels like we should go ahead and say it: Samsung’s pictures of the Moon are fake. </p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">But what exactly does “fake” mean in this scenario? It’s a tricky question to answer, and one that’s going to become increasingly important and complex as computational techniques are integrated further into the photographic process. We can say for certain that our understanding of what makes a photo <em>fake</em> will soon change, just as it has in the past to accommodate digital cameras, Photoshop, Instagram filters, and more. But for now, let’s stick with the case of Samsung and the Moon.</p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">The test of Samsung’s phones conducted by <a href="https://www.reddit.com/r/Android/comments/11nzrb0/samsung_space_zoom_moon_shots_are_fake_and_here/">Reddit user u/ibreakphotos</a> was ingenious in its simplicity. They created an intentionally blurry photo of the Moon, displayed it on a computer screen, and <a href="https://imgur.com/ifIHr3S">then photographed this image using a Samsung S23 Ultra</a>. As you can see below, the first image on the screen showed <em>no detail at all</em>, but the resulting picture showed a crisp and clear “photograph” of the Moon. The S23 Ultra added details that simply weren’t present before. There was no upscaling of blurry pixels and no retrieval of seemingly lost data. There was just a new Moon — a fake one. </p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">Here’s the blurry image of the Moon that was used: </p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">A GIF of the photo-taking process:</p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">And the resulting “photograph”:</p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">This is not a new controversy. People have been asking questions about Samsung’s Moon photography ever since the company unveiled a 100x “Space Zoom” feature in its S20 Ultra in 2020. Some have accused the company of simply copying and pasting prestored textures onto images of the Moon to produce its photographs, but Samsung says the process is more involved than that. </p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">In 2021, <a href="https://www.inverse.com/input/reviews/is-samsung-galaxy-s21-ultra-using-ai-to-fake-detailed-moon-photos-investigation-super-resolution-analysis"><em>Input Mag</em> published</a> a lengthy feature on the “fake detailed moon photos” taken by the Galaxy S21 Ultra. Samsung told the publication that “no image overlaying or texture effects are applied when taking a photo” but that the company uses AI to detect the Moon’s presence and “then offers a detail enhancing function by reducing blurs and noises.” </p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">The company later offered a bit more information in this <a href="https://r1-community-samsung-com.translate.goog/t5/camcyclopedia/%EB%8B%AC-%EC%B4%AC%EC%98%81/ba-p/19202094?_x_tr_sl=auto&amp;_x_tr_tl=en&amp;_x_tr_hl=en-GB">blog post</a> (translated from Korean by Google). But the core of the explanation — the description of the vital step that takes us from a photograph of a blurry Moon to a sharp Moon — is dealt with in obfuscatory terms. Samsung simply says it uses a “detail improvement engine function” to “<em>effectively</em> remove noise and maximize the details of the moon to complete a bright and clear picture of the moon” (emphasis added). What does that mean? We simply don’t know. </p></div><div class="duet--article--article-body-component clear-both block md:float-left md:mr-30 md:w-[320px] lg:-ml-100"><div class="duet--article--article-pullquote mb-20"><p class="mb-10 h-[22px] w-[65px] bg-franklin"></p><p class="duet--article--dangerously-set-cms-markup relative bg-repeating-lines-dark bg-[length:1px_1.2em] pb-8 font-polysans text-28 font-medium leading-120 tracking-1 selection:bg-franklin-20 dark:bg-repeating-lines-light dark:text-white dark:selection:bg-blurple">A “detail improvement engine function” is to blame</p></div></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">The generous interpretation is that Samsung’s process captures blurry details in the original photograph and then upscales them using AI. This is an established technique that has its problems (see: <a href="https://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning">Xerox copiers altering numbers</a> when upscaling fuzzy originals), and I don’t think it would make the resulting photograph fake. But as the Reddit tests show, Samsung’s process is more intrusive than this: it doesn’t just improve the sharpness of blurry details — it <em>creates</em> them. It’s at this point that I think most people would agree the resulting image is, for better or worse, fake.</p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">The difficulty here is that the concept of “fakeness” is a spectrum rather than a binary. (Like all categories we use to divide the world.) For photography, the standard of “realness” is usually defined by the information received by an optical sensor: the light captured when you take the photo. You can then edit this information pretty extensively the way professional photographers tweak RAW images and adjust color, exposure, contrast, and so on, but the end result is not fake. In this particular case, though, the Moon images captured by Samsung’s phone seem less the result of optical data and more the product of a computational process. In other words: it’s a generated image more than a photo. </p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">Some may not agree with this definition, and that’s fine. Drawing this distinction is also going to become much trickier in the future. Ever since smartphone manufacturers started using computational techniques to overcome the limits of smartphones’ small camera sensors, the mix of “optically captured” and “software-generated” data in their output has been shifting. We’re certainly heading to a future where techniques like Samsung’s “detail improvement engine” will become more common and applied more widely. You could train “detail improvement engines” on all sorts of data, like the faces of your family and friends to make sure you never take a bad photo of them, or on famous landmarks to improve your holiday snaps. In time, we’ll probably forget we ever called such images fake.</p></div><div class="duet--article--article-body-component clear-both block md:float-left md:mr-30 md:w-[320px] lg:-ml-100"><div class="duet--article--article-pullquote mb-20"><p class="mb-10 h-[22px] w-[65px] bg-franklin"></p><p class="duet--article--dangerously-set-cms-markup relative bg-repeating-lines-dark bg-[length:1px_1.2em] pb-8 font-polysans text-28 font-medium leading-120 tracking-1 selection:bg-franklin-20 dark:bg-repeating-lines-light dark:text-white dark:selection:bg-blurple">Samsung says “no image overlaying or texture effects are applied when taking a photo”</p></div></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">But for now, Samsung’s Moon imagery sticks out, and I think this is because it’s a particularly convenient application for this sort of computational photography. For a start, Moon photography is visually amenable. The Moon looks more or less the same in every picture taken from Earth (ignoring <a href="https://en.wikipedia.org/wiki/Libration">librations</a> and <a href="https://www.planetary.org/articles/can-the-moon-be-upside-down">rotational differences</a>), and while it has detail, it doesn’t have depth. That makes AI enhancements relatively straightforward to add. And secondly: Moon photography is <a href="https://www.gsmarena.com/samsung_teases_epic_nights_and_moon_photography_with_the_s23_ultras_cameras-news-57304.php">marketing catnip</a> because a) everyone knows phones take bad pictures of the Moon and b) everyone can test the feature for themselves. That’s made it an easy way for Samsung to illustrate the photographic prowess of its phones. Just check out this advert for the S23 Ultra with a Moon-zoom at 11 seconds in: </p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">It’s this viral appeal that’s gotten the company into trouble. Without properly explaining the feature, Samsung has allowed many people to confuse its AI-improved images for a physics-defying optical zoom that cannot fit in a smartphone. In turn, that’s made others keen to debunk the images (because the tech world loves a scandal). Samsung doesn’t exactly claim its Moon shots are representative of <em>all </em>its zoom photography, but a consumer would be forgiven for thinking this, so it’s worth emphasizing what’s really going on.</p></div><div class="duet--article--article-body-component"><p class="duet--article--dangerously-set-cms-markup duet--article--standard-paragraph mb-20 font-fkroman text-18 leading-160 -tracking-1 selection:bg-franklin-20 dark:text-white dark:selection:bg-blurple [&amp;_a:hover]:shadow-highlight-franklin dark:[&amp;_a:hover]:shadow-highlight-blurple [&amp;_a]:shadow-underline-black dark:[&amp;_a]:shadow-underline-white">Ultimately, photography is changing, and our understanding of what constitutes a “real photo” will change with it. But for the time being, it seems fair to conclude that Samsung’s Moon photographs are more fake than real. Presumably, in a few years’ time, this may no longer hold. Samsung did not immediately respond to <em>The Verge</em>’s request for comment, but we’ll update this piece if they get back to us. In the meantime, if you’d like to take an unadulterated photo of the Moon using your Samsung device, just turn off the “Scene Optimizer” feature and get ready to snap a picture of a blurry circle in the sky. </p></div></div>
  76. </article>
  77. <hr>
  78. <footer>
  79. <p>
  80. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  81. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-home"></use>
  82. </svg> Accueil</a> •
  83. <a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
  84. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-rss2"></use>
  85. </svg> Suivre</a> •
  86. <a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
  87. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-user-tie"></use>
  88. </svg> Pro</a> •
  89. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
  90. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-mail"></use>
  91. </svg> Email</a> •
  92. <abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
  93. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-hammer2"></use>
  94. </svg> Légal</abbr>
  95. </p>
  96. <template id="theme-selector">
  97. <form>
  98. <fieldset>
  99. <legend><svg class="icon icon-brightness-contrast">
  100. <use xlink:href="/static/david/icons2/symbol-defs-2021-12.svg#icon-brightness-contrast"></use>
  101. </svg> Thème</legend>
  102. <label>
  103. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  104. </label>
  105. <label>
  106. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  107. </label>
  108. <label>
  109. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  110. </label>
  111. </fieldset>
  112. </form>
  113. </template>
  114. </footer>
  115. <script src="/static/david/js/instantpage-5.1.0.min.js" type="module"></script>
  116. <script>
  117. function loadThemeForm(templateName) {
  118. const themeSelectorTemplate = document.querySelector(templateName)
  119. const form = themeSelectorTemplate.content.firstElementChild
  120. themeSelectorTemplate.replaceWith(form)
  121. form.addEventListener('change', (e) => {
  122. const chosenColorScheme = e.target.value
  123. localStorage.setItem('theme', chosenColorScheme)
  124. toggleTheme(chosenColorScheme)
  125. })
  126. const selectedTheme = localStorage.getItem('theme')
  127. if (selectedTheme && selectedTheme !== 'undefined') {
  128. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  129. }
  130. }
  131. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  132. window.addEventListener('load', () => {
  133. let hasDarkRules = false
  134. for (const styleSheet of Array.from(document.styleSheets)) {
  135. let mediaRules = []
  136. for (const cssRule of styleSheet.cssRules) {
  137. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  138. continue
  139. }
  140. // WARNING: Safari does not have/supports `conditionText`.
  141. if (cssRule.conditionText) {
  142. if (cssRule.conditionText !== prefersColorSchemeDark) {
  143. continue
  144. }
  145. } else {
  146. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  147. continue
  148. }
  149. }
  150. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  151. }
  152. // WARNING: do not try to insert a Rule to a styleSheet you are
  153. // currently iterating on, otherwise the browser will be stuck
  154. // in a infinite loop…
  155. for (const mediaRule of mediaRules) {
  156. styleSheet.insertRule(mediaRule.cssText)
  157. hasDarkRules = true
  158. }
  159. }
  160. if (hasDarkRules) {
  161. loadThemeForm('#theme-selector')
  162. }
  163. })
  164. </script>
  165. </body>
  166. </html>