From 5f8de423f190bbb79a62f804151bc24824fa32d8 Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Fri, 2 Feb 2018 04:16:08 -0500 Subject: Add m-esr52 at 52.6.0 --- .../viewsource/content/viewPartialSource.js | 22 + .../viewsource/content/viewPartialSource.xul | 163 ++++ .../viewsource/content/viewSource-content.js | 978 +++++++++++++++++++++ .../components/viewsource/content/viewSource.css | 11 + .../components/viewsource/content/viewSource.js | 884 +++++++++++++++++++ .../components/viewsource/content/viewSource.xul | 235 +++++ .../viewsource/content/viewSourceUtils.js | 524 +++++++++++ 7 files changed, 2817 insertions(+) create mode 100644 toolkit/components/viewsource/content/viewPartialSource.js create mode 100644 toolkit/components/viewsource/content/viewPartialSource.xul create mode 100644 toolkit/components/viewsource/content/viewSource-content.js create mode 100644 toolkit/components/viewsource/content/viewSource.css create mode 100644 toolkit/components/viewsource/content/viewSource.js create mode 100644 toolkit/components/viewsource/content/viewSource.xul create mode 100644 toolkit/components/viewsource/content/viewSourceUtils.js (limited to 'toolkit/components/viewsource/content') diff --git a/toolkit/components/viewsource/content/viewPartialSource.js b/toolkit/components/viewsource/content/viewPartialSource.js new file mode 100644 index 000000000..0b069344a --- /dev/null +++ b/toolkit/components/viewsource/content/viewPartialSource.js @@ -0,0 +1,22 @@ +// -*- indent-tabs-mode: nil; js-indent-level: 2 -*- + +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +Components.utils.import("resource://gre/modules/Services.jsm"); + +function onLoadViewPartialSource() { + // check the view_source.wrap_long_lines pref + // and set the menuitem's checked attribute accordingly + let wrapLongLines = Services.prefs.getBoolPref("view_source.wrap_long_lines"); + document.getElementById("menu_wrapLongLines") + .setAttribute("checked", wrapLongLines); + document.getElementById("menu_highlightSyntax") + .setAttribute("checked", + Services.prefs.getBoolPref("view_source.syntax_highlight")); + + let args = window.arguments[0]; + viewSourceChrome.loadViewSourceFromSelection(args.URI, args.drawSelection, args.baseURI); + window.content.focus(); +} diff --git a/toolkit/components/viewsource/content/viewPartialSource.xul b/toolkit/components/viewsource/content/viewPartialSource.xul new file mode 100644 index 000000000..fdec367b1 --- /dev/null +++ b/toolkit/components/viewsource/content/viewPartialSource.xul @@ -0,0 +1,163 @@ + +# -*- Mode: HTML -*- +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + + + + + + + +%brandDTD; + +%sourceDTD; +]> + + + +