JavaScript preprocessors can help make authoring JavaScript easier and more convenient. For instance, CoffeeScript can help prevent easy-to-make mistakes and offer a cleaner syntax and Babel can bring ECMAScript 6 features to browsers that only support ECMAScript 5.
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.
You can apply a script from anywhere on the web to your Pen. Just put a URL to it here and we'll add it, in the order you have them, before the JavaScript in the Pen itself.
If the script you link to has the file extension of a preprocessor, we'll attempt to process it before applying.
You can also link to another Pen here, and we'll pull the JavaScript from that Pen and include it. If it's using a matching preprocessor, we'll combine the code before preprocessing, so you can use the linked Pen as a true dependency.
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.
[[[https://codepen.io/thebabydino/pen/zEbVPO]]]
svg(viewBox=[-d, -.5*d, 2*d, hf*d].join(' ')
xmlns='http://www.w3.org/2000/svg')
style
| svg { fill: #{darken}; font: #{fs}px consolas, monaco, monospace }
| svg > [d], [r] { fill: none; stroke: #{llight}; stroke-linecap: round; stroke-width: #{2*sw} }
| [y] + [d] { stroke: #{darken}; marker-end: url(#e) }
| [d] + [d] ~ [r] { fill: #{orange}; stroke: #333 }
| [d] + [y] { font: #{fs}px times new roman, serif }
| [r] + [d] { stroke: #{orange}; stroke-width: #{~~(3*sw)} }
| [d] + [d] { stroke: #{purple}; stroke-width: #{4*sw} }
| [d] ~ [y] { font-style: italic }
| tspan { font-size: .5em }
marker#e(markerWidth=ad markerHeight=ad
viewBox='0 -4 8 8'
orient='auto' refX='7')
path(d='M8 0 0-4V4')
//-radius text
text(x=-.5*(hrd + fs) y=-(.5*hrd + .2*fs)) R
text(x=.5*(hrd - .2*fs) y=-(.5*hrd + .2*fs)) R
text(x=.5*(-3*hrd - fs) y=(.5*hrd - .2*fs)) R
text(x=.5*(3*hrd - .2*fs) y=(.5*hrd - .2*fs)) R
//-axes
path(d=`M${-ax} 0H${ax}`)
text(x=ax - .5*fs y=-.5*fs) x
path(d=`M0${-ax}V${(hf*ax).toFixed(e)}`)
text(x=.4*fs y=(hf*ax - .2*fs).toFixed(e)) y
//-helper circles
circle(cx=-hrd r=hr)
circle(cx=hrd r=hr)
//-diameters
path(d=`M0${-hrd}V${3*hrd}M${-2*hrd} ${hrd}H${2*hrd}`)
//-squares
path(d=`M0${-hrd} ${2*hrd} ${hrd} 0 ${3*hrd}${-2*hrd} ${hrd}z
M${-ram}${ram - hrd}l${ram} ${ram} ${ram}${-ram}M0${ram - hrd}h1
M${ram - 2*hrd} ${hrd - ram}l${ram} ${ram}${-ram} ${ram}M${ram - 2*hrd} ${hrd}h1
M${2*hrd - ram} ${hrd - ram}l${-ram} ${ram} ${ram} ${ram}M${2*hrd - ram} ${hrd}h1`)
//-points
circle(r=.5*pr)
circle(cx=-hrd r=pr2)
circle(cx=hrd r=pr2)
circle(cy=-hrd r=pr)
circle(cy=3*hrd r=pr1)
circle(cy=hrd r=pr2)
circle(cx=-2*hrd cy=hrd r=pr)
circle(cx=2*hrd cy=hrd r=pr)
//-point names
text(y=-(hrd + .2*fs)) T
text(x=hrd - .4*fs y=fs) O<tspan>0</tspan>
text(x=-(hrd + .4*fs) y=fs) O<tspan>1</tspan>
text(x=.1*fs y=(hrd + .8*fs)) S
text(x=2*hrd - .2*fs y=(hrd + fs)) B<tspan>0</tspan>
text(x=-(2*hrd + .6*fs) y=(hrd + fs)) B<tspan>1</tspan>
text(x=-.8*fs y=(3*hrd + .6*fs)) C
// minimal SVG
<svg viewBox='-2500 -1250 5000 3125' xmlns='http://www.w3.org/2000/svg'><style>svg{fill:#333;font:150px consolas,monaco,monospace}svg>[d],[r]{fill:none;stroke:#ccc;stroke-linecap:round;stroke-width:10}[y]+[d]{stroke:#333;marker-end:url(#e)}[d]+[d]~[r]{fill:#f90;stroke:#333}[d]+[y]{font:150px times new roman,serif}[r]+[d]{stroke:#f90;stroke-width:15}[d]+[d]{stroke:#95a;stroke-width:20}[d]~[y]{font-style:italic}tspan{font-size:.5em}</style><marker id='e' markerWidth='10' markerHeight='10' viewBox='0 -4 8 8' orient='auto' refX='7'><path d='M8 0 0-4V4'/></marker><text x='-296' y='-251'>R</text><text x='206' y='-251'>R</text><text x='-738' y='191'>R</text><text x='648' y='191'>R</text><path d='M-1230 0H1230'/><text x='1155' y='-75'>x</text><path d='M0-1230V1538'/><text x='60' y='1508'>y</text><circle cx='-442' r='625'/><circle cx='442' r='625'/><path d='M0-442V1326M-884 442H884'/><path d='M0-442 884 442 0 1326-884 442zM-80-362l80 80 80-80M0-362h1M-804 362l80 80-80 80M-804 442h1M804 362l-80 80 80 80M804 442h1'/><circle r='12.5'/><circle cx='-442' r='13'/><circle cx='442' r='13'/><circle cy='-442' r='25'/><circle cy='1326' r='18'/><circle cy='442' r='13'/><circle cx='-884' cy='442' r='25'/><circle cx='884' cy='442' r='25'/><text y='-472'>T</text><text x='382' y='150'>O<tspan>0</tspan></text><text x='-502' y='150'>O<tspan>1</tspan></text><text x='15' y='562'>S</text><text x='854' y='592'>B<tspan>0</tspan></text><text x='-974' y='592'>B<tspan>1</tspan></text><text x='-120' y='1416'>C</text></svg>
body {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
margin: 0;
height: 100vh;
}
svg { display: block }
// minimal SVG: https://codepen.io/thebabydino/pen/jGJmyw?editors=1000
Also see: Tab Triggers