title: Using JavaScript to create a Chrome-style alert
body: <p>How do I create an alert in Chrome using JavaScript that opens a text box in the middle of the browser window and washes out the background, like so:</p>
  
  <p><img src="https://i.imgur.com/JMAU9o1.jpg" alt="a pretty Chrome alert"></p>
  
  <p>rather than an alert that just pops up an entirely new window (in my case in the Linux Mint GTK theme):</p>
  
  <p><img src="https://i.imgur.com/Wz772qU.jpg" alt="an ugly GTK popup"></p>
  
  <p>If I type <code>alert()</code> into the console, I get an alert that looks like the latter, in a separate window. </p>