A place to cache linked articles (think custom and personal wayback machine)
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

index.html 21KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451
  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>I bought 300 emoji domain names from Kazakhstan and built an email service (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="#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_2021-01-20.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. <meta name="robots" content="noindex, nofollow">
  52. <meta content="origin-when-cross-origin" name="referrer">
  53. <!-- Canonical URL for SEO purposes -->
  54. <link rel="canonical" href="https://tinyprojects.dev/projects/mailoji">
  55. <body class="remarkdown h1-underline h2-underline h3-underline em-underscore hr-center ul-star pre-tick">
  56. <article>
  57. <header>
  58. <h1>I bought 300 emoji domain names from Kazakhstan and built an email service</h1>
  59. </header>
  60. <nav>
  61. <p class="center">
  62. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  63. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-home"></use>
  64. </svg> Accueil</a> •
  65. <a href="https://tinyprojects.dev/projects/mailoji" title="Lien vers le contenu original">Source originale</a>
  66. </p>
  67. </nav>
  68. <hr>
  69. <p>TLDR; I bought 300 emoji domain names from Kazakhstan and built an <a href="https://mailoji.com" target="_blank">emoji email address service</a>. In the process I went viral on TikTok, made $1000 in a week, hired a Japanese voice actor, and learnt about the weird world of emoji domains.</p>
  70. <h3>🌅 The setup</h3>
  71. <p>Not long ago I decided it would be a brilliant idea to buy the domain name <a href="/posts/i_bought_netflix_dot_soy" target="_blank">netflix.soy</a>.</p>
  72. <p>Whilst arguably there are better ways to spend £17, I did learn a lot about domain names, including that it's possible to have emoji domains like <span class="domain">😊.ws</span>.</p>
  73. <p>It's pretty hard to go a day without seeing an emoji somewhere on the internet. Yet, I'd never seen an emoji domain name before.</p>
  74. <p>I wondered:</p>
  75. <p>Could I buy an emoji domain name?</p>
  76. <h3>💸 Buying an emoji domain name</h3>
  77. <p>My goal was to buy a single character emoji domain name, like 💡 or 🍰. I didn't know what I'd do with it, I just wanted to see if I could get one.</p>
  78. <p>I found a website that showed every available emoji domain for 4 different extensions.</p>
  79. <p>Sadly, nearly every single one had been registered. I was late to the party.</p>
  80. <p><img src="https://i.gyazo.com/6aa39e2f0e8e2f9039b61c95ea360cb7.png" alt="Taken emoji domains"></p>
  81. <p>A simple mailbox emoji with a .ws extension was still available though, so I bought it.</p>
  82. <h3>📪 The mailbox</h3>
  83. <p><img src="https://i.gyazo.com/1b78a0aab3ca0b04649eacf46fd3bc0a.png" alt="Mailbox emoji domain in GoDaddy"></p>
  84. <p><span class="domain">📪.ws</span> was now mine. Mission complete.</p>
  85. <p>I set up a website and felt rather accomplished with my tiny mailbox.</p>
  86. <p>I could've stopped there and called it a day. But, then I had another thought:</p>
  87. <p>Could I use my little mailbox emoji domain in an email address?</p>
  88. <p>That'd be pretty cute.</p>
  89. <h3>✉️ Emoji mail attempt #1</h3>
  90. <p>I gave it a go. I setup an email forwarder to route all email sent to <span class="domain">📪.ws</span> to my regular email address.</p>
  91. <p>Eagerly I typed <span class="domain">ben@📪.ws</span> into the "to" field of gmail and hit send.</p>
  92. <p><img src="https://i.gyazo.com/3ab67d13bcfad786b7f3ba9a01968272.png" alt="Sending first emoji mail"></p>
  93. <h3>🛑 Blocked</h3>
  94. <p>The email never hit my inbox. It was lost forever in cyberspace.</p>
  95. <p>Turns out emoji domain names score very highly for spam and were going to be blocked to high heaven.</p>
  96. <p>But, it was interesting that I could send mail towards an emoji email address.</p>
  97. <p>So I wondered:</p>
  98. <p>If a normal .com email address doesn't get blocked for spam, could I route my emoji mail through that?</p>
  99. <h3>💌 Emoji mail attempt #2</h3>
  100. <p>It would work like this: </p>
  101. <ol>
  102. <li>Email sent to <span class="domain">ben@📪.ws</span></li>
  103. <li><span class="domain">ben@📪.ws</span> forwards to <span class="domain">nospam@normal.com</span></li>
  104. <li><span class="domain">nospam@normal.com</span> forwards to my email address and won't get blocked.</li>
  105. </ol>
  106. <p>I cobbled together something using AWS, and tried my experiment again.</p>
  107. <p>
  108. </p>
  109. <p>to: <span class="domain">ben@📪.ws</span></p>
  110. <pre><code>&lt;p&gt;message: Hi Ben, how's it going?&lt;/p&gt;
  111. </code></pre>
  112. <p>Send.</p>
  113. <p><img src="https://i.gyazo.com/bdc529a214b0e2019a96a86c933c4bcb.png" alt="First emoji mail"></p>
  114. <p>It worked!</p>
  115. <h3>🧨 Where things started to get out of control</h3>
  116. <p>At this point I was inclined to stop and write a post about emoji email addresses. I'd had a good run.</p>
  117. <p>But then I wondered:</p>
  118. <p>My mailbox emoji email address is great and all, but do you know what would be better? <span class="domain">ben@⭐</span></p>
  119. <p>Now how do I get one of those?</p>
  120. <h3>🎣 Emoji domain name hunting</h3>
  121. <p>Only 13 TLDs in the world accept registrations of emoji domain names: .cf, .ga, .gq, .la, .ml, .tk, .st, .fm, .to, .je, .gg, .kz, and .ws.</p>
  122. <p>The website I had used to purchase <span class="domain">📪.ws</span> only showed 4 TLDs: .fm, .ws, .to and .ml. These are considered the gold standard of emoji domain name registrars.</p>
  123. <p>Every emoji had been taken on these though. You could of course get multi-character emoji domains like <span class="domain">🎉🐢.ws</span>, but I wanted single character emoji domains only.</p>
  124. <p>So I wondered:</p>
  125. <p>Do any of those other TLDs have any emoji domains left?</p>
  126. <h3>🔭 The great hunt</h3>
  127. <p>I already had some code that performed WHOIS lookups to see if a domain name is available for a list of TLDs.</p>
  128. <p>Previously I'd used this code to buy <a href="/posts/i_bought_netflix_dot_soy" target="_blank">facebook.网站</a>, only for Marky Z to snatch it back from me. Cheeky bugger.</p>
  129. <p>I booted up the code and loaded in some A-tier emojis (e.g. ⭐,😂,❤️) and the 13 TLDs that accepted them.</p>
  130. <p><i>&gt;node search.js</i> [ENTER]</p>
  131. <h3>🎁 The results</h3>
  132. <p><img src="https://i.gyazo.com/6adaeb53f45f75605749f78d4dcac8c3.png" alt="Console output showing available TLDs for emoji domains"></p>
  133. <p>Instantly I was seeing results! .la, .ga, .gq, .je. There were plenty of emojis still out there on these alternative extensions.</p>
  134. <p>An extension that stood out to me straight away was .gg, for the Island of Guernsey. "GG" is an acronym for "Good Game", and I say it often when I lose at online games. It was perfect.</p>
  135. <p><span class="domain">⭐.gg</span> was available for €29. I hit purchase.</p>
  136. <h3>💔 No GG for me</h3>
  137. <p>The next day Guernsey sent me an email.</p>
  138. <p><img src="https://i.gyazo.com/527c4941fbb3ddcffbc92a0c2ef1c828.png" alt="Email from Guernsey saying emoji domains not available on .gg"></p>
  139. <p>Long story short, although you could register emoji domain names with them, they didn't actually work.</p>
  140. <p>Good game Guernsey. Back to the drawing board.</p>
  141. <h3>⭐ Crazy for KZ</h3>
  142. <p>With every other extension I kept hitting walls. A lot of the registrars wouldn't even let me search for emoji domains. Nothing was working.</p>
  143. <p>One extension that kept cropping up was .kz of Kazakhstan. But, I headed over to their registar website and it was entirely in Russian.</p>
  144. <p><img src="https://i.gyazo.com/6c20c8eea912beb320555c0dace78b1b.png" alt="Russian domain name website"></p>
  145. <p>I do not speak Russian.</p>
  146. <p>Using Google Translate, I tried to navigate the website and buy a .kz emoji domain.</p>
  147. <p>It was a long, painful process. But, after phoning my bank to confirm I was indeed trying to make a purchase using Kazakhstani tenge, <span class="domain">⭐.kz</span> was sitting in my account.</p>
  148. <p>I plugged it into my email system and <span class="domain">ben@⭐.kz</span> worked.</p>
  149. <p>Very nice.</p>
  150. <h3>💼 Let's start an email service</h3>
  151. <p>Something excited me. Nearly all single character emojis were available on .kz, and they were only $8 each.</p>
  152. <p>So, I wondered:</p>
  153. <p>What if you could get an email address with any emoji you wanted?</p>
  154. <p>I pictured email addresses like <span class="domain">bob@🚀</span>, <span class="domain">alice@🌸</span>, <span class="domain">melvin@🍆</span>.</p>
  155. <p>All I'd need to do is buy every emoji domain to build a service like this.</p>
  156. <p>It was insane, but it was possible.</p>
  157. <h3>🌙 The night of 150 emojis</h3>
  158. <p>I decided I was going to do it.</p>
  159. <p>If I was chuffed with my mailbox emoji email address, perhaps others would be too.</p>
  160. <p>I got out my debit card, and, one by one, started buying Kazakhstan emoji domains.</p>
  161. <p><span class="domain">💡.kz</span>, <span class="domain">👑.kz</span>, <span class="domain">🌈.kz</span>, <span class="domain">😎.kz</span>. Buy, buy, buy, buy.</p>
  162. <p>It was slightly painful watching my bank account going down, and the number of emoji domains go up.</p>
  163. <p>80 emojis in, forking over money for a goat emoji domain name, you seriously start to question what you're doing.</p>
  164. <p>$1200 later, 150 emoji domains were mine.</p>
  165. <h3>💻 Building an emoji email address website</h3>
  166. <p>Finally, I needed a website where you could register an emoji email address and it would forward mail like <span class="domain">ben@📪.ws</span> did.</p>
  167. <p>Using vanilla HTML, JS and CSS, plus Stripe's API for payments, I cobbled together an MVP over a few weeks.</p>
  168. <p>Once it was done, I bought one last domain name: <a href="https://mailoji.com" target="_blank">mailoji.com</a>. My new emoji email address service <a href="https://mailoji.com" target="_blank">Mailoji</a> was ready. Get your emoji email addresses.</p>
  169. <p><img src="https://i.gyazo.com/30c54b0bed4ffc85cb38940a2b26748e.png" alt="Mailoji emoji email address website"></p>
  170. <h3>📱 TikTok</h3>
  171. <p>I'd gone from being curious about emoji domain names to now owning 150 of Kazakhstan's finest.</p>
  172. <p>The next step was to convince someone else to buy an emoji email address.</p>
  173. <p>TikTok seemed like a good place to start given its demographic. So, I recorded a short video advert and started a "TikTok for business" application to publish it.</p>
  174. <p>On the final page of the application I was asked for a VAT registration number. Mailoji was not a proper business yet, so there was no way I could publish my ad.</p>
  175. <p>Screw it, I'll post the video normally.</p>
  176. <p>Upload.</p>
  177. <h3>🎉 First sales</h3>
  178. <p>Here is the <a href="https://www.tiktok.com/@mailoji/video/6925405275201539334?lang=en&amp;is_copy_url=1&amp;is_from_webapp=v3" target="_blank">advert</a> if you're interested.</p>
  179. <p>The video sat at 0 views for about 5 hours before the TikTok algorithm started to work its magic.</p>
  180. <p>Slowly, the views started ramping up. 500 views, to 5k views, to 50k views. It was incredible to witness.</p>
  181. <p>People were loving emoji email addresses, people were hating emoji email addresses.</p>
  182. <p>It was like Marmite, a talking point. None of it mattered though because emoji email addresses were selling! <span class="domain">@🚀</span>, <span class="domain">@📷</span> &amp; <span class="domain">@💻</span> addresses were the most popular.</p>
  183. <p>Over 2 days the TikTok video reached 200k+ views, and 60 emoji email addresses had been sold netting ~$300/yr in revenue.</p>
  184. <p><img src="https://i.gyazo.com/e33fb288704cc42f58e50ff4a5d33fa8.png" alt="Stripe graph showing first sales from selling emoji domains"></p>
  185. <p>I took this as a fantastic indicator. So guess what I did?</p>
  186. <h3>💵 Buying more emoji domain names</h3>
  187. <p>I decided to purchase 100 more emoji domains.</p>
  188. <p>I cried into my keyboard forking out yet more money for a llama emoji that I probably didn't need.</p>
  189. <p>In the end I had 250 emoji domains. If there was ever a moat into the emoji email address world, this was it.</p>
  190. <h3>📅 Preparing for launch</h3>
  191. <p>I figured the more people with emoji email addresses, the more people who would see them, and the more people who would buy them. A beautiful cycle.</p>
  192. <p>My next goal was a Product Hunt launch to get exposure for Mailoji, and kickstart this cycle.</p>
  193. <p>I prepped my launch post, carefully choosing each word and image.</p>
  194. <p>I even created this over-hyped promotional video, complete with Japanese voice actor saying the words "Mailoji".</p>
  195. <p class="video-container">
  196. <iframe src="https://www.youtube.com/embed/JKxEXZv4G3c" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen>VIDEO</iframe></p>
  197. <p>Mailoji was ready for launch.</p>
  198. <h3>🚀 Launch Day</h3>
  199. <p>At 12:03 AM PST Mailoji went live on <a href="https://www.producthunt.com/posts/mailoji" target="_blank">Product Hunt</a>. We had come a long way from that little mailbox emoji.</p>
  200. <p><img src="https://i.gyazo.com/0cf1d62b2d820c8f456a95da3cffda01.png" alt="Product hunt launch thumbnail"></p>
  201. <p>It was 8:03 AM UK time. Bleary eyed, with a cup of tea in hand, I watched as Mailoji did battle.</p>
  202. <p>I had chosen to launch on a Wednesday against some stiff competition, but Mailoji really held its own.</p>
  203. <p>At the end of the day it finished in 5th place. Here were the end of day stats: </p>
  204. <ul>
  205. <li>🌎 6.7k website views
  206. </li><li>💌 150+ emoji email addresses sold</li>
  207. <li>💵 $830/yr ARR</li>
  208. <li>🔺 320 upvotes</li>
  209. <li>🏅 5th place on Product Hunt</li>
  210. <li>🎀 Most popular Mailoji: @🚀</li>
  211. </ul>
  212. <p>Over 150 emoji email addresses were sold in a day, and I received some fantastic feedback from the Product Hunt community.</p>
  213. <p>It was done, Mailoji had officially launched.</p>
  214. <h3>📙 The aftermath</h3>
  215. <p>I wish this story ended with Mailoji blowing up and the queen registering an emoji email address or something (I'll reserve <span class="domain">Liz@👑.kz</span> just in case).</p>
  216. <p>But, currently Mailoji is sitting at ~$1440/year in revenue. There's now 300 emoji domains to choose from though.</p>
  217. <p><img src="https://i.gyazo.com/6eac0eb3bcdaa1ee78e57b6692ed9afc.png" alt="Final Stripe ARR chart for Mailoji"></p>
  218. <p>Even though I still haven't made the money back on all the emoji domains I bought, creating an emoji email address service was so much fun.</p>
  219. <p>It was an adventure. A rabbit hole containing multiple rabbit holes.</p>
  220. <p>This project started out as an exploration into emoji domain names; a weird, forgotten about internet feature that I've now become quite fond of.</p>
  221. <p>Yes emoji domains are hard to type on desktop, yes there's too many variations, and yes, most form validations hate them.</p>
  222. <p>But they're fun, and I think tech should be more fun.</p>
  223. <p>Thanks for reading. If you want to get in touch, I've got a brand new email address at the bottom of this website.</p>
  224. </article>
  225. <hr>
  226. <footer>
  227. <p>
  228. <a href="/david/" title="Aller à l’accueil"><svg class="icon icon-home">
  229. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-home"></use>
  230. </svg> Accueil</a> •
  231. <a href="/david/log/" title="Accès au flux RSS"><svg class="icon icon-rss2">
  232. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-rss2"></use>
  233. </svg> RSS</a> •
  234. <a href="http://larlet.com" title="Go to my English profile" data-instant><svg class="icon icon-user-tie">
  235. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-user-tie"></use>
  236. </svg> Pro</a> •
  237. <a href="mailto:david%40larlet.fr" title="Envoyer un courriel"><svg class="icon icon-mail">
  238. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-mail"></use>
  239. </svg> Email</a> •
  240. <abbr class="nowrap" title="Hébergeur : Alwaysdata, 62 rue Tiquetonne 75002 Paris, +33184162340"><svg class="icon icon-hammer2">
  241. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-hammer2"></use>
  242. </svg> Légal</abbr>
  243. </p>
  244. <template id="theme-selector">
  245. <form>
  246. <fieldset>
  247. <legend><svg class="icon icon-brightness-contrast">
  248. <use xlink:href="/static/david/icons2/symbol-defs.svg#icon-brightness-contrast"></use>
  249. </svg> Thème</legend>
  250. <label>
  251. <input type="radio" value="auto" name="chosen-color-scheme" checked> Auto
  252. </label>
  253. <label>
  254. <input type="radio" value="dark" name="chosen-color-scheme"> Foncé
  255. </label>
  256. <label>
  257. <input type="radio" value="light" name="chosen-color-scheme"> Clair
  258. </label>
  259. </fieldset>
  260. </form>
  261. </template>
  262. </footer>
  263. <script>
  264. function loadThemeForm(templateName) {
  265. const themeSelectorTemplate = document.querySelector(templateName)
  266. const form = themeSelectorTemplate.content.firstElementChild
  267. themeSelectorTemplate.replaceWith(form)
  268. form.addEventListener('change', (e) => {
  269. const chosenColorScheme = e.target.value
  270. localStorage.setItem('theme', chosenColorScheme)
  271. toggleTheme(chosenColorScheme)
  272. })
  273. const selectedTheme = localStorage.getItem('theme')
  274. if (selectedTheme && selectedTheme !== 'undefined') {
  275. form.querySelector(`[value="${selectedTheme}"]`).checked = true
  276. }
  277. }
  278. const prefersColorSchemeDark = '(prefers-color-scheme: dark)'
  279. window.addEventListener('load', () => {
  280. let hasDarkRules = false
  281. for (const styleSheet of Array.from(document.styleSheets)) {
  282. let mediaRules = []
  283. for (const cssRule of styleSheet.cssRules) {
  284. if (cssRule.type !== CSSRule.MEDIA_RULE) {
  285. continue
  286. }
  287. // WARNING: Safari does not have/supports `conditionText`.
  288. if (cssRule.conditionText) {
  289. if (cssRule.conditionText !== prefersColorSchemeDark) {
  290. continue
  291. }
  292. } else {
  293. if (cssRule.cssText.startsWith(prefersColorSchemeDark)) {
  294. continue
  295. }
  296. }
  297. mediaRules = mediaRules.concat(Array.from(cssRule.cssRules))
  298. }
  299. // WARNING: do not try to insert a Rule to a styleSheet you are
  300. // currently iterating on, otherwise the browser will be stuck
  301. // in a infinite loop…
  302. for (const mediaRule of mediaRules) {
  303. styleSheet.insertRule(mediaRule.cssText)
  304. hasDarkRules = true
  305. }
  306. }
  307. if (hasDarkRules) {
  308. loadThemeForm('#theme-selector')
  309. }
  310. })
  311. </script>
  312. </body>
  313. </html>