Take the 2-minute tour ×
Arqade is a question and answer site for passionate videogamers on all platforms. It's 100% free, no registration required.

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

share|improve this question
    
+1 just for linking such a clever and amusing game! –  Wikwocket Oct 6 '10 at 13:56
1  
That bookmarklet would be very fitting as an easter egg on this site. –  Senseful Oct 7 '10 at 21:26

2 Answers 2

up vote 4 down vote accepted

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.

share|improve this answer

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

share|improve this answer
    
Aha. So you could make up some tag that it doesn't ignore that supersets script and use that as a switch for erkie, the game –  Mechko Oct 5 '10 at 3:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.