// ==UserScript==
// @name           document.all
// @namespace      http://loucypher.wordpress.com/
// @description    Makes Firefox recognize document.all
// ==/UserScript==

if (document.doctype) { // if standard compliance

  // original script by Erik Arvidsson
  // http://webfx.eae.net/dhtml/ieemu/allmodel.html

  var allGetter = function () {
     var a = this.getElementsByTagName("*");
     var node = this;
     a.tags = function (sTagName) {
        return node.getElementsByTagName(sTagName);
     };
     return a;
  };

  unsafeWindow.HTMLDocument.prototype.__defineGetter__("all", allGetter);
  unsafeWindow.HTMLElement.prototype.__defineGetter__("all", allGetter);

}

