Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <title>PathKit (Skia + WASM)</title> |
| 3 | <meta charset="utf-8" /> |
| 4 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 5 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 6 | |
| 7 | <style> |
| 8 | svg, canvas { |
| 9 | border: 1px dashed #AAA; |
| 10 | } |
| 11 | |
| 12 | canvas { |
| 13 | width: 200px; |
| 14 | height: 200px; |
| 15 | } |
| 16 | |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 17 | canvas.big { |
| 18 | width: 300px; |
| 19 | height: 300px; |
| 20 | } |
| 21 | |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 22 | </style> |
| 23 | |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 24 | <h2> Can output to an SVG Path, a Canvas, or a Path2D object </h2> |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 25 | <svg id=svg1 xmlns='http://www.w3.org/2000/svg' width=200 height=200></svg> |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 26 | <canvas id=canvas1></canvas> |
| 27 | <canvas id=canvas2></canvas> |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 28 | |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 29 | <h2> Interact with NewPath() just like a Path2D Object </h2> |
| 30 | <canvas class=big id=canvas3></canvas> |
| 31 | <canvas class=big id=canvas4></canvas> |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 32 | |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 33 | <h2> Has various Path Effects </h2> |
| 34 | <canvas class=big id=canvas5></canvas> |
| 35 | <canvas class=big id=canvas6></canvas> |
| 36 | <canvas class=big id=canvas7></canvas> |
| 37 | <canvas class=big id=canvas8></canvas> |
| 38 | <canvas class=big id=canvas9></canvas> |
| 39 | <canvas class=big id=canvas10></canvas> |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 40 | <canvas class=big id=canvasTransform></canvas> |
| 41 | |
| 42 | <h2> Supports fill-rules of nonzero and evenodd </h2> |
| 43 | <svg id=svg2 xmlns='http://www.w3.org/2000/svg' width=200 height=200></svg> |
| 44 | <svg id=svg3 xmlns='http://www.w3.org/2000/svg' width=200 height=200></svg> |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 45 | |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 46 | <script type="text/javascript" src="/node_modules/experimental-pathkit-wasm/bin/pathkit.js"></script> |
| 47 | |
| 48 | <script type="text/javascript" charset="utf-8"> |
| 49 | |
| 50 | PathKitInit({ |
| 51 | locateFile: (file) => '/node_modules/experimental-pathkit-wasm/bin/'+file, |
| 52 | }).then((PathKit) => { |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 53 | window.PathKit = PathKit; |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 54 | OutputsExample(PathKit); |
| 55 | Path2DExample(PathKit); |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 56 | PathEffectsExample(PathKit); |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 57 | MatrixTransformExample(PathKit); |
| 58 | FilledSVGExample(PathKit); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 59 | }); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 60 | |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 61 | function setCanvasSize(ctx, width, height) { |
| 62 | ctx.canvas.width = width; |
| 63 | ctx.canvas.height = height; |
| 64 | } |
| 65 | |
| 66 | function OutputsExample(PathKit) { |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 67 | let firstPath = PathKit.FromSVGString('M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8zm.5-13H11v6l5.25 3.15.75-1.23-4.5-2.67z'); |
| 68 | |
| 69 | let secondPath = PathKit.NewPath(); |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 70 | // Acts somewhat like the Canvas API, except can be chained |
| 71 | secondPath.moveTo(1, 1) |
| 72 | .lineTo(20, 1) |
| 73 | .lineTo(10, 30) |
| 74 | .closePath(); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 75 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 76 | // Join the two paths together (mutating firstPath in the process) |
| 77 | firstPath.op(secondPath, PathKit.PathOp.INTERSECT); |
| 78 | |
| 79 | let simpleStr = firstPath.toSVGString(); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 80 | |
| 81 | let newSVG = document.createElementNS('http://www.w3.org/2000/svg', 'path'); |
| 82 | newSVG.setAttribute('stroke', 'rgb(0,0,200)'); |
| 83 | newSVG.setAttribute('fill', 'white'); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 84 | newSVG.setAttribute('transform', 'scale(8,8)'); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 85 | newSVG.setAttribute('d', simpleStr); |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 86 | document.getElementById('svg1').appendChild(newSVG); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 87 | |
| 88 | // Draw directly to Canvas |
| 89 | let ctx = document.getElementById('canvas1').getContext('2d'); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 90 | setCanvasSize(ctx, 200, 200); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 91 | ctx.strokeStyle = 'green'; |
| 92 | ctx.fillStyle = 'white'; |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 93 | ctx.scale(8, 8); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 94 | ctx.beginPath(); |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 95 | firstPath.toCanvas(ctx); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 96 | ctx.stroke(); |
| 97 | |
| 98 | // create Path2D object and use it in a Canvas. |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 99 | let path2D = firstPath.toPath2D(); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 100 | ctx = document.getElementById('canvas2').getContext('2d'); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 101 | setCanvasSize(ctx, 200, 200); |
| 102 | ctx.canvas.width = 200 |
| 103 | ctx.scale(8, 8); |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 104 | ctx.fillStyle = 'purple'; |
| 105 | ctx.strokeStyle = 'orange'; |
| 106 | ctx.fill(path2D); |
| 107 | ctx.stroke(path2D); |
| 108 | |
| 109 | // clean up WASM memory |
| 110 | // See http://kripken.github.io/emscripten-site/docs/porting/connecting_cpp_and_javascript/embind.html?highlight=memory#memory-management |
| 111 | firstPath.delete(); |
| 112 | secondPath.delete(); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 113 | } |
| 114 | |
| 115 | function Path2DExample(PathKit) { |
| 116 | let objs = [new Path2D(), PathKit.NewPath(), new Path2D(), PathKit.NewPath()]; |
| 117 | let canvases = [ |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 118 | document.getElementById('canvas3').getContext('2d'), |
| 119 | document.getElementById('canvas4').getContext('2d') |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 120 | ]; |
| 121 | |
| 122 | for (i = 0; i <= 1; i++) { |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 123 | let path = objs[i]; |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 124 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 125 | path.moveTo(20, 5); |
| 126 | path.lineTo(30, 20); |
| 127 | path.lineTo(40, 10); |
| 128 | path.lineTo(50, 20); |
| 129 | path.lineTo(60, 0); |
| 130 | path.lineTo(20, 5); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 131 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 132 | path.moveTo(20, 80); |
| 133 | path.bezierCurveTo(90, 10, 160, 150, 190, 10); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 134 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 135 | path.moveTo(36, 148); |
| 136 | path.quadraticCurveTo(66, 188, 120, 136); |
| 137 | path.lineTo(36, 148); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 138 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 139 | path.rect(5, 170, 20, 20); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 140 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 141 | path.moveTo(150, 180); |
| 142 | path.arcTo(150, 100, 50, 200, 20); |
| 143 | path.lineTo(160, 160); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 144 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 145 | path.moveTo(20, 120); |
| 146 | path.arc(20, 120, 18, 0, 1.75 * Math.PI); |
| 147 | path.lineTo(20, 120); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 148 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 149 | let secondPath = objs[i+2]; |
| 150 | secondPath.ellipse(130, 25, 30, 10, -1*Math.PI/8, Math.PI/6, 1.5*Math.PI, false); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 151 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 152 | path.addPath(secondPath); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 153 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 154 | let m = document.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGMatrix(); |
| 155 | m.a = 1; m.b = 0; |
| 156 | m.c = 0; m.d = 1; |
| 157 | m.e = 0; m.f = 20.5; |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 158 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 159 | path.addPath(secondPath, m); |
| 160 | // With PathKit, one can also just provide the 6 params as floats, to avoid |
| 161 | // the overhead of making an SVGMatrix |
| 162 | // path.addPath(secondPath, 1, 0, 0, 1, 0, 20.5); |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 163 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 164 | canvasCtx = canvases[i]; |
| 165 | canvasCtx.fillStyle = 'blue'; |
| 166 | setCanvasSize(canvasCtx, 300, 300); |
| 167 | canvasCtx.scale(1.5, 1.5); |
| 168 | if (path.toPath2D) { |
| 169 | canvasCtx.stroke(path.toPath2D()); |
| 170 | } else { |
| 171 | canvasCtx.stroke(path); |
| 172 | } |
Kevin Lubick | 641bf87 | 2018-08-06 14:49:39 -0400 | [diff] [blame] | 173 | } |
| 174 | |
| 175 | |
| 176 | objs[1].delete(); |
| 177 | } |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 178 | |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 179 | // see https://fiddle.skia.org/c/@discrete_path |
| 180 | function drawStar(path) { |
| 181 | let R = 115.2, C = 128.0; |
| 182 | path.moveTo(C + R + 22, C); |
| 183 | for (let i = 1; i < 8; i++) { |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 184 | let a = 2.6927937 * i; |
| 185 | path.lineTo(C + R * Math.cos(a) + 22, C + R * Math.sin(a)); |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 186 | } |
| 187 | path.closePath(); |
| 188 | return path; |
| 189 | } |
| 190 | |
| 191 | function PathEffectsExample(PathKit) { |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 192 | let effects = [ |
| 193 | // no-op |
| 194 | (path) => path, |
| 195 | // dash |
| 196 | (path) => path.dash(10, 3, 0), |
| 197 | // trim (takes optional 3rd param for returning the trimmed part |
| 198 | // or the complement) |
| 199 | (path) => path.trim(0.25, 0.8, false), |
| 200 | // simplify |
| 201 | (path) => path.simplify(), |
| 202 | // stroke |
| 203 | (path) => path.stroke({ |
| 204 | width: 15, |
| 205 | join: PathKit.StrokeJoin.BEVEL, |
| 206 | cap: PathKit.StrokeCap.BUTT, |
| 207 | miter_limit: 1, |
| 208 | }), |
| 209 | // "offset effect", that is, making a border around the shape. |
| 210 | (path) => { |
| 211 | let orig = path.copy(); |
| 212 | path.stroke({ |
| 213 | width: 10, |
| 214 | join: PathKit.StrokeJoin.ROUND, |
| 215 | cap: PathKit.StrokeCap.SQUARE, |
| 216 | }) |
| 217 | .op(orig, PathKit.PathOp.DIFFERENCE); |
| 218 | orig.delete(); |
| 219 | } |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 220 | ]; |
| 221 | |
| 222 | let names = ["(plain)", "Dash", "Trim", "Simplify", "Stroke", "Offset"]; |
| 223 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 224 | for (let i = 0; i < effects.length; i++) { |
| 225 | let path = PathKit.NewPath(); |
| 226 | drawStar(path); |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 227 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 228 | // The transforms apply directly to the path. |
| 229 | effects[i](path); |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 230 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 231 | let ctx = document.getElementById(`canvas${i+5}`).getContext('2d'); |
| 232 | setCanvasSize(ctx, 300, 300); |
| 233 | ctx.strokeStyle = '#3c597a'; |
| 234 | ctx.fillStyle = '#3c597a'; |
| 235 | if (i === 4 || i === 5) { |
| 236 | ctx.fill(path.toPath2D(), path.getFillTypeString()); |
| 237 | } else { |
| 238 | ctx.stroke(path.toPath2D()); |
| 239 | } |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 240 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 241 | ctx.font = '42px monospace'; |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 242 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 243 | let x = 150-ctx.measureText(names[i]).width/2; |
| 244 | ctx.strokeText(names[i], x, 290); |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 245 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 246 | path.delete(); |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 247 | } |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 248 | } |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 249 | |
Kevin Lubick | 11194ab | 2018-08-17 13:52:56 -0400 | [diff] [blame] | 250 | function MatrixTransformExample(PathKit) { |
| 251 | // Creates an animated star that twists and moves. |
| 252 | let ctx = document.getElementById('canvasTransform').getContext('2d'); |
| 253 | setCanvasSize(ctx, 300, 300); |
| 254 | ctx.strokeStyle = '#3c597a'; |
| 255 | |
| 256 | let path = drawStar(PathKit.NewPath()); |
| 257 | // TODO(kjlubick): Perhaps expose some matrix helper functions to allow |
| 258 | // clients to build their own matrices like this? |
| 259 | // These matrices represent a 2 degree rotation and a 1% scale factor. |
| 260 | let scaleUp = [1.0094, -0.0352, 3.1041, |
| 261 | 0.0352, 1.0094, -6.4885, |
| 262 | 0 , 0 , 1]; |
| 263 | |
| 264 | let scaleDown = [ 0.9895, 0.0346, -2.8473, |
| 265 | -0.0346, 0.9895, 6.5276, |
| 266 | 0 , 0 , 1]; |
| 267 | |
| 268 | let i = 0; |
| 269 | function frame(){ |
| 270 | i++; |
| 271 | if (Math.round(i/100) % 2) { |
| 272 | path.transform(scaleDown); |
| 273 | } else { |
| 274 | path.transform(scaleUp); |
| 275 | } |
| 276 | |
| 277 | ctx.clearRect(0, 0, 300, 300); |
| 278 | ctx.stroke(path.toPath2D()); |
| 279 | |
| 280 | ctx.font = '42px monospace'; |
| 281 | let x = 150-ctx.measureText('Transform').width/2; |
| 282 | ctx.strokeText('Transform', x, 290); |
| 283 | |
| 284 | window.requestAnimationFrame(frame); |
| 285 | } |
| 286 | window.requestAnimationFrame(frame); |
| 287 | } |
| 288 | |
| 289 | function FilledSVGExample(PathKit) { |
| 290 | let innerRect = PathKit.NewPath(); |
| 291 | innerRect.rect(80, 100, 40, 40); |
| 292 | |
| 293 | let outerRect = PathKit.NewPath(); |
| 294 | outerRect.rect(50, 10, 100, 100) |
| 295 | .op(innerRect, PathKit.PathOp.XOR); |
| 296 | |
| 297 | let str = outerRect.toSVGString(); |
| 298 | |
| 299 | let diffSVG = document.createElementNS('http://www.w3.org/2000/svg', 'path'); |
| 300 | diffSVG.setAttribute('stroke', 'red'); |
| 301 | diffSVG.setAttribute('fill', 'black'); |
| 302 | // force fill-rule to nonzero to demonstrate difference |
| 303 | diffSVG.setAttribute('fill-rule', 'nonzero'); |
| 304 | diffSVG.setAttribute('d', str); |
| 305 | document.getElementById('svg2').appendChild(diffSVG); |
| 306 | |
| 307 | let unionSVG = document.createElementNS('http://www.w3.org/2000/svg', 'path'); |
| 308 | unionSVG.setAttribute('stroke', 'red'); |
| 309 | unionSVG.setAttribute('fill', 'black'); |
| 310 | // ask what the path thinks fill-rule should be ('evenodd') |
| 311 | // SVG and Canvas both use the same keys ('nonzero' and 'evenodd') and both |
| 312 | // default to 'nonzero', so one call supports both. |
| 313 | unionSVG.setAttribute('fill-rule', outerRect.getFillTypeString()); |
| 314 | unionSVG.setAttribute('d', str); |
| 315 | document.getElementById('svg3').appendChild(unionSVG); |
| 316 | |
| 317 | outerRect.delete(); |
| 318 | innerRect.delete(); |
Kevin Lubick | 97d6d98 | 2018-08-10 15:53:16 -0400 | [diff] [blame] | 319 | } |
| 320 | |
Kevin Lubick | e1b36fe | 2018-08-02 11:30:33 -0400 | [diff] [blame] | 321 | </script> |