summaryrefslogtreecommitdiffstats
path: root/comm/calendar/base/content/preferences/notifications.js
diff options
context:
space:
mode:
Diffstat (limited to 'comm/calendar/base/content/preferences/notifications.js')
-rw-r--r--comm/calendar/base/content/preferences/notifications.js24
1 files changed, 24 insertions, 0 deletions
diff --git a/comm/calendar/base/content/preferences/notifications.js b/comm/calendar/base/content/preferences/notifications.js
new file mode 100644
index 0000000000..11725b8309
--- /dev/null
+++ b/comm/calendar/base/content/preferences/notifications.js
@@ -0,0 +1,24 @@
+/* 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/. */
+
+/* exported gNotificationsPane */
+/* globals Preferences */
+
+Preferences.add({ id: "calendar.notifications.times", type: "string" });
+
+/**
+ * Global Object to hold methods for the notifications pref pane.
+ */
+var gNotificationsPane = {
+ /**
+ * Initialize <calendar-notifications-setting> and listen to the change event.
+ */
+ init() {
+ var calendarNotificationsSetting = document.getElementById("calendar-notifications-setting");
+ calendarNotificationsSetting.value = Preferences.get("calendar.notifications.times").value;
+ calendarNotificationsSetting.addEventListener("change", () => {
+ Preferences.get("calendar.notifications.times").value = calendarNotificationsSetting.value;
+ });
+ },
+};