Skip to content

Instantly share code, notes, and snippets.

@ghostdevv
Created November 27, 2023 21:47
Show Gist options
  • Save ghostdevv/15c7f12929de903949b933caa10b6953 to your computer and use it in GitHub Desktop.
Save ghostdevv/15c7f12929de903949b933caa10b6953 to your computer and use it in GitHub Desktop.

Revisions

  1. ghostdevv created this gist Nov 27, 2023.
    13 changes: 13 additions & 0 deletions width.html
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    </head>
    <body>
    <script>
    document.write(`<pre>${JSON.stringify({ width: window.innerWidth, height: window.innerHeight }, null, 2)}</pre>`)
    </script>
    </body>
    </html>