In erkie, is it possible to destroy everything?

Is it possible to destroy EVERYTHING on a given page when playing the game from http://erkie.github.com?


No, it's not always possible. Usually some items stick around with a 0×0 hitbox thus preventing you from bringing the page down to the bare background.

You'll know you've gone as far as you can when holding the B button shows no blinking targets.

One such site, for example, is the (classic) Twitter profile page.


Taken from the source code:

var ignoredTypes = ['HTML', 'HEAD', 'BODY', 'SCRIPT', 'TITLE', 'META', 'STYLE', 'LINK', 'SHAPE', 'LINE', 'GROUP', 'IMAGE', 'STROKE', 'FILL', 'SKEW', 'PATH', 'TEXTPATH']; // Half of these are for IE g_vml
var hiddenTypes = ['BR', 'HR'];

...

// elements with className ASTEROIDSYEAH are part of the "game"
if ( indexOf(ignoredTypes, el.tagName.toUpperCase()) == -1 && el.prefix != 'g_vml_' && hasOnlyTextualChildren(el) && el.className != "ASTEROIDSYEAH" && el.offsetHeight > 0 ) {

...
function indexOf(arr, item, from){
    if ( arr.indexOf ) return arr.indexOf(item, from);
    var len = arr.length;
    for (var i = (from < 0) ? Math.max(0, len + from) : from || 0; i < len; i++){
        if (arr[i] === item) return i;
    }
    return -1;
};

Thus ignoredTypes are not valid enemies