Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>Example</title>
</head>
<body>
<script>
  (function() {
    "use strict";
    var ua = navigator.userAgent.toLowerCase();
    if (ua.indexOf("safari/") !== -1 &&  // It says it's Safari
        ua.indexOf("windows") !== -1 &&  // It says it's on Windows
        ua.indexOf("chrom")   === -1     // It DOESN'T say it's Chrome/Chromium
       ) {
      // Looks like Safari on Windows (but browser detection is unreliable and best avoided)
      display("Looks like Safari on Windows (but browser detection is unreliable and best avoided)");
    }
    else {
      display("Does not look like Safari on Windows (but browser detection is unreliable and best avoided)");
    }
    
    function display(msg) {
      var p = document.createElement('p');
      p.innerHTML = String(msg);
      document.body.appendChild(p);
    }
  })();
</script>
</body>
</html>
Output 300px

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
tjcrowderpro
0viewers