JSFiddle

  • Cxense Related Content Example

    Uses the USAT Related Content widget config to show similar content to that represented by the url

    // Async load of cx.js - for some reason this doesn't load properly through the regular external resource loading
        (function ...
  • Cxense Related Content Example #16 is the latest revision

    Uses the USAT Related Content widget config to show similar content to that represented by the url

    // Async load of cx.js - for some reason this doesn't load properly through the regular external resource loading
        (function ...
  • Text to DataUri

    Simple text to canvas to data Uri utility code

    function draw() {
        var can = document.getElementById('canvas');
        var ctx = can.getContext('2d');
        var fillText = "QA";
    
        ctx.textBaseline = "top";
        ctx.font ...
  • base62

    // http://www.zhihua-lai.com/acm // http://rot47.net // base62.js // provides conversion between base10 and base62

    // http://www.zhihua-lai.com/acm
    // http://rot47.net
    // base62.js
    // provides conversion between base10 and base62
     
    var Base62 = (function(){                
      var ...
  • The world in 1K #5 is the latest revision

    Copied from http://aem1k.com/world/ just to independently verify that it works - and it does. Amazing.

    .<script>
    eval(z='p="<"+"pre>"/* ,.oq#+     ,._, */;for(y in n="zw24l6k\
    4e3t4jnt4qj24xh2 x/* =<,m#F^    A W###q. */42kty24wrt413n243n\
    9h243pdxt41csb yz/* #K       q##H######Am */43iyb6k43pk7243nm\
    r24".split(4)){/* dP      cpq#q##########b, */for(a in t=pars\
    eInt(n[y],36)+/*         p##@###YG=[#######y */(e=x=r=[]))for\
    (r=!r,i=0;t[a/*         d#qg `*PWo##q#######D */]>i;i+=.05)wi\
    th(Math)x-= /*        aem1k ...</,m#f^></"+"pre></script>
  • USAT Flow #12 is the latest revision

    No-Library (pure JS), HTML, CSS, JavaScript

      var diagram = Diagram.parse(document.getElementById('uml').innerText);
      diagram.drawSVG("diagram", {theme: 'hand'});
    
  • bacon

    No-Library (pure JS), HTML, CSS, JavaScript

    No code. How about adding some?
  • USA TODAY Headlines

    Playing with USA TODAY Articles API via (undocumented) CORS request.

    $.getJson("http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20json%20where%20url%3D%22http%3A%2F%2Fwww ...
  • USA TODAY Headlines

    Playing with USA TODAY Articles API via (undocumented) CORS request.

    var createCORSRequest = function(method, url) {
      var xhr = new XMLHttpRequest();
      if ("withCredentials" in xhr) {
        // Most browsers.
        xhr.open(method, url, true ...
  • Fullscreen detection test

    cross-browser fullscreen detection test code. IE does not implement the fullscreen API.

    var is_fs = function() {
        return (screen.height === window.outerHeight);
    };
    
    var cfs = function() {
        var d = document;
        if (d.cancelFullScreen) {
            d.cancelFullScreen();
        } else ...