From 18c67c92eda2994735a070e2c80bce8a292cec52 Mon Sep 17 00:00:00 2001 From: Kris Maglione Date: Mon, 6 Oct 2008 00:51:16 +0000 Subject: [PATCH] Insert the chrome stylesheet before the last element in the document, rather than the first. --- content/buffer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/buffer.js b/content/buffer.js index e5d8c875..ea515876 100644 --- a/content/buffer.js +++ b/content/buffer.js @@ -212,7 +212,7 @@ liberator.Buffer = function () //{{{ let styles = liberator.storage.newObject("styles", Styles, false); let stylesheet = document.createProcessingInstruction("xml-stylesheet", ""); - document.insertBefore(stylesheet, document.firstChild); + document.insertBefore(stylesheet, document.childNodes[document.childNodes.length - 1]); let chromeObserver = function () { stylesheet.data = 'type="text/css" href="' + styles.chromeCSS + '"' }; storage.addObserver("styles", chromeObserver);