Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel is required to process package imports. If you need a different preprocessor remove all packages first.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML Settings

Here you can Sed posuere consectetur est at lobortis. Donec ullamcorper nulla non metus auctor fringilla. Maecenas sed diam eget risus varius blandit sit amet non magna. Donec id elit non mi porta gravida at eget metus. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

HTML

              
                <div>
  <table id="cookieContainer"></table>
</div>
              
            
!

CSS

              
                
              
            
!

JS

              
                (function($) {
  "use strict"; // Start of use strict
  let userLanguage = $("<tr></tr>").text(
    "User Language: " + navigator.language
  );

  let javaEnabled = "";
  if (navigator.javaEnabled()) {
    javaEnabled = $("<tr></tr>").text("You have Java enabled");
  } else {
    javaEnabled = $("<tr></tr>").text("You have Java not enabled");
  }

  let cookiesEnabled = "";
  if (navigator.cookieEnabled) {
    cookiesEnabled = $("<tr></tr>").text("You have Cookies enabled");
  } else {
    cookiesEnabled = $("<tr></tr>").text("You have Cookies disabled");
  }

  let doNotTrack = "";
  if (navigator.doNotTrack) {
    doNotTrack = $("<tr></tr>").text(
      "You asked this website to not be tracked"
    );
  } else {
    doNotTrack = $("<tr></tr>").text(
      "You haven't asked this website to not be tracked"
    );
  }

  let hardwareConcurrency = $("<tr></tr>").text(
    "Your device has " + navigator.hardwareConcurrency + " threads"
  );

  let touchDevice = "";
  if (navigator.maxTouchPoints == 1) {
    touchDevice = $("<tr></tr>").text("You're using a desktop or laptop");
  } else {
    touchDevice = $("<tr></tr>").text("You are using a smartphone or tablet");
  }

  let userBrowser = $("<tr></tr>").text(
    navigator.vendor + " is the developer of your browser"
  );

  let dateAndZone = $("<tr></tr>").text(
    "The date, time and timezone you are in: " + Date()
  );

  let OSName = "Unknown OS";
  if (navigator.appVersion.indexOf("Win") != -1) OSName = "Windows";
  if (navigator.userAgent.indexOf("NT 5.1") != -1) OSName = "Windows XP";
  if (navigator.userAgent.indexOf("NT 6.0") != -1) OSName = "Windows Vista";
  if (navigator.userAgent.indexOf("NT 6.1") != -1) OSName = "Windows 7";
  if (navigator.appVersion.indexOf("NT 10.0") != -1) OSName = "Windows 10";
  if (navigator.appVersion.indexOf("X11") != -1) OSName = "UNIX";
  if (navigator.appVersion.indexOf("Linux") != -1) OSName = "Linux";
  if (navigator.appVersion.indexOf("Android 4") != -1)
    OSName = "Android KitKat";
  if (navigator.appVersion.indexOf("Android 5") != -1)
    OSName = "Android Lollipop";
  if (navigator.appVersion.indexOf("Android 6") != -1)
    OSName = "Android Marshmallow";
  if (navigator.appVersion.indexOf("Android 7") != -1)
    OSName = "Android Nougat";
  if (navigator.appVersion.indexOf("Android 8") != -1) OSName = "Android Oreo";
  if (navigator.appVersion.indexOf("Android 9") != -1) OSName = "Android Pie";
  if (navigator.appVersion.indexOf("Mac") != -1) OSName = "MacOS";
  if (navigator.userAgent.indexOf("Mac OS X 10.4") != -1)
    OSName = "MacOS Tiger";
  if (navigator.userAgent.indexOf("Mac OS X 10.5") != -1)
    OSName = "MacOS Leopard";
  if (navigator.userAgent.indexOf("Mac OS X 10.6") != -1)
    OSName = "MacOS Snow Leopard";
  if (navigator.userAgent.indexOf("Mac OS X 10.7") != -1)
    OSName = "MacOS Lion (Barolo)";
  if (navigator.userAgent.indexOf("Mac OS X 10.8") != -1)
    OSName = "MacOS Mountain Lion (Zinfandel)";
  if (navigator.userAgent.indexOf("Mac OS X 10.9") != -1)
    OSName = "MacOS Mavericks";
  if (navigator.userAgent.indexOf("Mac OS X 10.10") != -1)
    OSName = "MacOS Yosemite";
  if (navigator.userAgent.indexOf("Mac OS X 10.11") != -1)
    OSName = "MacOS El Capitan";
  if (navigator.userAgent.indexOf("Mac OS X 10.12") != -1)
    OSName = "MacOS Sierra";
  if (navigator.userAgent.indexOf("Mac OS X 10.13") != -1)
    OSName = "MacOS High Sierra";
  if (navigator.userAgent.indexOf("Mac OS X 10.14") != -1)
    OSName = "MacOS Mojave";
  if (navigator.userAgent.indexOf("iPhone") != -1) OSName = "iOS";
  if (navigator.userAgent.indexOf("iPhone OS 8") != -1) OSName = "iOS v8";
  if (navigator.userAgent.indexOf("iPhone OS 9") != -1) OSName = "iOS v9";
  if (navigator.userAgent.indexOf("iPhone OS 10") != -1) OSName = "iOS v10";
  if (navigator.userAgent.indexOf("iPhone OS 11") != -1) OSName = "iOS v11";

  let userOS = $("<tr></tr>").text("You are using " + OSName + " as your OS");

  let userScreen = $("<tr></tr>").text(
    "You're display is " +
      screen.width +
      "px wide and " +
      screen.height +
      "px high"
  );

  let userDisplayColor = $("<tr></tr>").text(
    "Your hardware color resolution is " + screen.colorDepth + "bit deep"
  );

  $("#cookieContainer").append(
    userLanguage,
    javaEnabled,
    cookiesEnabled,
    doNotTrack,
    hardwareConcurrency,
    touchDevice,
    userBrowser,
    dateAndZone,
    userOS,
    userScreen,
    userDisplayColor
  );
})(jQuery); // End of use strict

              
            
!
999px

Console