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