From 302bf1b523012e11b60425d6eee1221ebc2724eb Mon Sep 17 00:00:00 2001 From: "Matt A. Tobin" Date: Sun, 3 Nov 2019 00:17:46 -0400 Subject: Issue #1258 - Part 1: Import mailnews, ldap, and mork from comm-esr52.9.1 --- mailnews/base/search/content/viewLog.js | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 mailnews/base/search/content/viewLog.js (limited to 'mailnews/base/search/content/viewLog.js') diff --git a/mailnews/base/search/content/viewLog.js b/mailnews/base/search/content/viewLog.js new file mode 100644 index 000000000..61ae44df7 --- /dev/null +++ b/mailnews/base/search/content/viewLog.js @@ -0,0 +1,36 @@ +/* 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/. */ + +var gFilterList; +var gLogFilters; +var gLogView; + +function onLoad() +{ + gFilterList = window.arguments[0].filterList; + + gLogFilters = document.getElementById("logFilters"); + gLogFilters.checked = gFilterList.loggingEnabled; + + gLogView = document.getElementById("logView"); + + // for security, disable JS + gLogView.docShell.allowJavascript = false; + + gLogView.setAttribute("src", gFilterList.logURL); +} + +function toggleLogFilters() +{ + gFilterList.loggingEnabled = gLogFilters.checked; +} + +function clearLog() +{ + gFilterList.clearLog(); + + // reload the newly truncated file + gLogView.reload(); +} + -- cgit v1.2.3