From 98c6b7016ebfae76871b5408d6645a43fcc3a92e Mon Sep 17 00:00:00 2001 From: James Campos Date: Sat, 28 May 2011 11:52:14 -0700 Subject: [PATCH] work on firefox 3.6 (maybe) --- 4chan_x.user.js | 3 +++ script.coffee | 3 +++ 2 files changed, 6 insertions(+) diff --git a/4chan_x.user.js b/4chan_x.user.js index b29845e22..59b532b17 100644 --- a/4chan_x.user.js +++ b/4chan_x.user.js @@ -482,6 +482,9 @@ return _results; }; } + if (!d.head) { + d.head = $('head', d); + } $$ = function(selector, root) { if (root == null) { root = d.body; diff --git a/script.coffee b/script.coffee index a7c2ceeb0..99d6801c3 100644 --- a/script.coffee +++ b/script.coffee @@ -334,6 +334,9 @@ if not Object.keys Object.keys = (o) -> key for key in o +# upgrade your firefox god damn it! +if not d.head then d.head = $('head', d) + $$ = (selector, root=d.body) -> Array::slice.call root.querySelectorAll selector