To try the thousands of add-ons available here, download Mozilla Firefox, a fast, free way to surf the Web!
CloseWelcome to Firefox Add-ons.
Choose from thousands of extra features and styles to make Firefox your own.
CloseStephane
About me
Name | Stephane |
---|---|
User since | June 5, 2018 |
Number of add-ons developed | 0 add-ons |
Average rating of developer's add-ons | Not yet rated |
My Reviews
Auto Filter Timer
Rated 3 out of 5 stars
Very useful addon. It works well except for a bug at startup.
When restoring the filter schedules, it sometimes assign them to the wrong folder.
Here is a patch for that issue:
==========
$ diff -rU 2 auto_filter_timer-1.03 auto_filter_timer-1.04
diff -rU 2 auto_filter_timer-1.03/content/schedulefilters.js auto_filter_timer-1.04/content/schedulefilters.js
--- auto_filter_timer-1.03/content/schedulefilters.js 2018-04-13 17:59:16.000000000 +0200
+++ auto_filter_timer-1.04/content/schedulefilters.js 2018-06-05 23:36:28.463433487 +0200
@@ -233,13 +233,17 @@
}
-function addFiltersSchedule() {
+function addFiltersSchedule( folder ) {
var stringsBundle = document.getElementById("schedulefilters-string-bundle");
var num = promptNumber(stringsBundle.getString('addSchedule'), stringsBundle.getString('period'), 1, 1440, 30);
if (num != null) {
- _addFiltersSchedule(num, true);
+ _addFiltersSchedule(folder, num, true);
}
}
-function _addFiltersSchedule(num, needSave) {
- var folder = GetFirstSelectedMsgFolder();
+function _addFiltersSchedule(folder, num, needSave) {
+ // If the folder is not specified, this function was called from the Thunderbird interface by the user
+ // If the folder is defined, this function is called from the loadFiltersSchedule function at startup
+ if ( folder == null ) {
+ folder = GetFirstSelectedMsgFolder();
+ }
var idInterval = scheduleFilters(folder, num*60000);
filterSchedule.add(folder, idInterval, num);
@@ -252,5 +256,5 @@
var item = filterSchedule.get(folder);
if (item == null) {
- addFiltersSchedule();
+ addFiltersSchedule( folder );
return;
}
@@ -289,9 +293,10 @@
for (var i=0;i<schedule.length;i++) {
var folderUri = schedule[i].uri;
- if ((msgWindow.openFolder == null) || (msgWindow.openFolder.URI != folderUri)) {
- var folder = MailUtils.getFolderForURI(folderUri);
- gFolderTreeView.selectFolder(folder);
- }
- _addFiltersSchedule(schedule[i].time, false);
+ // NOTE - Selecting a folder to apply a schedule doesn't work at startup, as Thunderbird or other add-ons can modify the selected folder at any time
+ //if ((msgWindow.openFolder == null) || (msgWindow.openFolder.URI != folderUri)) {
+ var folder = MailUtils.getFolderForURI(folderUri);
+ //gFolderTreeView.selectFolder(folder);
+ //}
+ _addFiltersSchedule(folder, schedule[i].time, false);
}
} catch (err) {
==========
To create your own collections, you must have a Mozilla Add-ons account.