dist/strawberry.v1.0.8.js
// From Simon Willison. A safe way to fire onload w/o screwing up everyone else.
From Simon Willison. A safe way to fire onload w/o screwing up everyone else.
From Simon Willison . A safe way to fire onload w / o screwing up everyone else .
function addLoadEvent(func) {
        var oldonload = window.onload;
        if (typeof window.onload != 'function') {
            window.onload = func;
        } else {
            window.onload = function() {
                if (oldonload) {
                    oldonload();
                }
                func();
            }
        }
    }
function addLoadEvent ( func ) { var oldonload = window . onload ; if ( typeof window . onload != 'function' ) { window . onload = func ; } else { window . onload = function ( ) { if ( oldonload ) { oldonload ( ) ; } func ( ) ; } } }
From Simon Willison.
From Simon Willison .