Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>script tag with settings</title>
  <style>
    body { font-family: sans-serif; }
  </style>
</head>
<body>
  <h1>Filthy example</h1>
  <p>This is an example script that uses inner html in the script tag to configure itself. Arguably the options could be data attributes on the script node, but this was weird to look at - which is what I liked :) </p>
  <p>Below is injected based on the script's settings:</p>
  <script src="http://jsbin.com/OFOpOva/1.js">
    {
      "name": "Remy Sharp",
      "twitter": "rem",
      "batshit": true
    }
  </script>
</body>
</html>
Output

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

Dismiss x
public
Bin info
rempro
0viewers