Skip to content

Commit 27935d6

Browse files
committed
Documented the main idea of the mutation observers.
1 parent 58d5f21 commit 27935d6

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

content/moresnooze.js

+15
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,21 @@ function buildCustomSnoozeMenus() {
7676
});
7777
}
7878

79+
// The main idea for hooking after the event which creates the snooze popups is the following sequence of calls:
80+
// CalAlarmMonitor.jsm: function onAlarm(aItem, aAlarm)
81+
// calAlarmWindow.addWidgetFor(aItem, aAlarm);
82+
// calendar-alarm-dialog.js: function addWidgetFor(aItem, aAlarm)
83+
// let widget = document.createXULElement("richlistitem", {
84+
// is: "calendar-alarm-widget-richlistitem",
85+
// });
86+
// let alarmRichlist = document.getElementById("alarm-richlist");
87+
//
88+
// // Add widgets sorted by start date ascending
89+
// ...
90+
// setupTitle()
91+
// document.title = title.replace("#1", reminders);
92+
// So we wait for the assignment to document.title to happen and hook that event via mutation observers.
93+
7994
function mutationCallback(mutations) {
8095
if (mutations.length > 0) {
8196
buildCustomSnoozeMenus();

0 commit comments

Comments
 (0)