From 0841a01e1592ba640623f08d895b925dcb896e8e Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Thu, 18 Dec 2008 21:05:42 +1100 Subject: [PATCH] access MarkupDocumentViewer via getBrowser() - only FF defines getMarkupDocumentViewer --- common/content/buffer.js | 20 ++------------------ common/content/hints.js | 2 +- 2 files changed, 3 insertions(+), 19 deletions(-) diff --git a/common/content/buffer.js b/common/content/buffer.js index e6a15cd7..bfd0b356 100644 --- a/common/content/buffer.js +++ b/common/content/buffer.js @@ -172,24 +172,8 @@ function Buffer() //{{{ "Show current website with a minimal style sheet to make it easily accessible", "boolean", false, { - setter: function (value) - { - try - { - window.getMarkupDocumentViewer().authorStyleDisabled = value; - } - catch (e) {} - - return value; - }, - getter: function () - { - try - { - return window.getMarkupDocumentViewer().authorStyleDisabled; - } - catch (e) {} - } + setter: function (value) getBrowser().markupDocumentViewer.authorStyleDisabled = value, + getter: function () getBrowser().markupDocumentViewer.authorStyleDisabled }); /////////////////////////////////////////////////////////////////////////////}}} diff --git a/common/content/hints.js b/common/content/hints.js index c9b8957f..ca55ac9a 100644 --- a/common/content/hints.js +++ b/common/content/hints.js @@ -254,7 +254,7 @@ function Hints() //{{{ // 'usermode' appropriately? We're generally not very well integrated // into FF so having menu items toggle Vimperator options may be // confusing. --djk - if (window.getMarkupDocumentViewer().authorStyleDisabled) + if (getBrowser().markupDocumentViewer.authorStyleDisabled) { let css = []; // FIXME: Broken for imgspans.