Google Chrome and Firefox Extension
mCoffee
This is my take on the extension Morning Coffee from Firefox, which allows you to launch bookmarks based on rules (day, month, time, autostart). I wrote this extension for my own use, and am sharing it in case anyone finds it useful.
This is a very basic extension, there is no configuration to be done. You need to manage the bookmarks using the bookmark manager. The plus side of using bookmarks only is that bookmarks are sync'ed using the standard browser’s feature.
The extension checks if the site is already opened in an existing tab, if so it won't launch a duplicate tab. Note that some sites automatically expands / redirect the base url. For example, if you bookmarked https://mail.google.com, the launched url will be https://mail.google.com/mail/. If you clicked on the extension icon again, it will open another tab for Gmail because "https://mail.google.com" doesn't match "https://mail.google.com/mail/".
https://chrome.google.com/webstore/detail/mcoffee/kgmogjgiagjjdmeilcakimafnpndpggk?hl=en
https://addons.mozilla.org/en-US/firefox/addon/mcoffee/
NOTE: [14th February 2023] This extension is pretty much what I wanted it to be, therefore there won't be much updates happening from here. If there is any features that you think is important, feel free to contact me and I'll see what I can do.
There is a testing version named "mCoffee brew" for Google Chrome below if you are interested in testing new functionalities.
https://chrome.google.com/webstore/detail/mcoffee-brew/ecoilihegacbikdhinijoobphdkebamd
Usage
1) create a bookmark folder named "mCoffee". If you have multiple folders with the same name, It will only process the first one found. If you run the extension without a folder named "mCoffee" in your bookmarks, the extension's icon colour will be red instead of grey.
2) Under the "mCoffee" folder, you can create the following subfolders (create only folders that you use, i.e. you don't need to create "Tue" if you don't have Tuesday specific bookmarks to launch)
i) Daily
- place bookmarks that you want to launch everyday in here
ii) Mon / Tue / Wed / Thu / Fri / Sat / Sun
- place bookmarks for specific days into the corresponding folder. e.g. urls in the "Sun" folder will be launched on Sundays
iii) 1 - 31
- place bookmarks for a specific day of the month here. For example, bookmarks in the folder "1" will be launched on the first day of the month (e.g. you want to check your bank statement every 1st day of the month).
iv) Weekday
- bookmarks that you want to launch from Mon - Fri
v) Weekend
- bookmarks that you want to launch on Sat, Sun
vi) Autostart
- any bookmarks here will be launched when the extension is loaded
vii) Rules
- set conditions for launching bookmarks. See below for details.
Rules Folder
Bookmarks in the rules folders have comma separated conditions specified within square brackets. For example, "Testing [2,Mon,Wed]". If your bookmark title has 2 brackets, only the first set gets processed. e.g. "[Mon,AM] Front or Back [Tue,PM]" will only be evaluated on the condition "Mon,AM"
In addition to the same conditions as the folder names above (Daily, Mon / Tue / Wed / Thu / Fri / Sat / Sun, 1 - 31, Weekday, Weekend, Autostart), the following additional conditions can be specified;
1) AM / PM
launch bookmarks in the morning only or afternoon e.g. "Testing [2,Mon,Wed,AM]" to launch "Testing" on the morning of 2nd of the month, Mondays and Wednesdays
2) XX-YY
set a time range, for example "[16-18] Happy 2 Hours" to launch bookmarks between 4PM and 6PM inclusive
3) Jan / Feb / Mar / Apr / May / Jun / Jul / Aug / Sep / Oct / Nov / Dec
launch the bookmark in the specified month. Works as a modifier to a specified day
4) G_Groupname
Launch the bookmark into a TabGroup "Groupname". For example, [Daily,G_News] will launch the bookmark into the tabgroup "News", "[Daily,G_Games]" will launch the bookmark into the tabgroup "Games"
5) X
Skip launching the bookmark. Use this if you want to temporarily disable launching a bookmark
Example of Rules based bookmarks.
i) "Testing [2,Mon,Wed,AM]"
launch "Testing" on the mornings of 2nd of the month, Mondays and Wednesdays
ii) “Testing [2,Mon,Wed]"
launch the bookmark on the 2nd of the month, Mondays and Wednesdays
iii) "[1] Monthly Bookmark"
launch on the 1st of the month
iv) [31,Oct] Boo”
launch on the 31st of October
use this to launch a URL on a specific day of a specific month
v) “[1,Jan,Apr,Jul,Oct] Quarterly Bookmark”
launch on the 1st of Jan, Apr, Jul and Oct.
vi) “[1,Jan,Jul] Half Yearly Bookmark”
launch on the 1st of Jan and Jul
vii) “[1,Jan,Feb,Mar,Apr,Sep,Oct,Nov,Dec] Slip, Slop, Slap in OZ”
launch on the 1st of Jan, Feb, Mar, Apr, Sep, Oct, Nov, Dec (a.k.a months with the letter “r” in it as they teach in primary schools here)
viii) "[Mon,Wed,Fri] Front, Middle, End"
launch the bookmark on Mon, Wed and Fri. Equivalent to having 3 copies of the same bookmark stored in the folders Mon, Wed and Fri
viii) "[Daily,Nov] Movember"
launch the bookmark in November only
ix) "[Daily,Nov,X] Movember"
skip this bookmark (the "X" condition)
Notes
Bookmarks are opened in the following folder order; Daily, day of week and day of month. Standalone folders are processed first, followed by the Rules folder. For example, if your "Daily" folder has the bookmarks "B1, B5" and your Rules folder has a Daily bookmark "B3", they are launched in the order B1, B5, B3.
Bookmarks within each folder are opened in the order they are found so you can sort them if you want them opened in a particular order.
When first started, the badge on the icon should be grey. If the colour of the icon is red, that means the extension didn't find a folder named "mCoffee" in your bookmarks.
After you have clicked on the icon, extension's icon will turn green.
Privacy notice
This extension does not collect any data.
Permissions
bookmarks - needed to search the bookmarks for the mCoffee and associated folders
tabs - needed to check that the url is not already opened, and to launch a new tab
tabGroups. - launch bookmarks into tabgroups
2022-08-15: 1.6.4
new rules condition (X). If a bookmark has the "X" condition, it will not be launched. For example, the bookmark "[Daily,X] Take a break" will not launch.
extension cannot be run within 3 seconds from the last execution, this is to ignore accidental double clicks
2022-08-15: 1.6.3
try checking the status of tabs as a workaround to prevent the browser from wrongly detecting the extension as idle
2022-07-30: 1.6.2
code changes to the queuing of bookmarks to launch. This will allow more options for rule processing in future
launch bookmarks one at a time to prevent too many concurrent connections. If a website takes more than 3 seconds to complete, proceed to launch the next bookmark
extension icon's badge will show the number of bookmarks left to launch
2023-05-13: v1.5.5
tweaked icon to have more contrast when using dark themes
extension cannot be run within 3 seconds from the last execution, this is to ignore accidental double clicks
2022-08-16: v1.5.4.1
minor fix to TabGroup index so that TabGroups consistently moves to the front of the tab bar
2022-06-30: v1.5.4
TabGroup support (G_Groupname). For example, "My Bookmark [Daily,G_News]" will launch the bookmark into the tabgroup "News", [Daily,G_Games] will launch the bookmark into the tabgroup "Games"
new permission required: tabGroups
2022-06-07: v1.5.3.5 (mCoffee brew version)
TabGroup support (G_Groupname). For example, "My Bookmark [Daily,G_News]" will launch the bookmark into the tabgroup "News", [Daily,G_Games] will launch the bookmark into the tabgroup "Games"
2022-04-26: v1.5.2.1
removed 1 second delay in opening tabs
code changes to adapt to service worker behaviour in manifest v3
2022-04-23: v1.5.1
remove limit of 3 concurrent tabs, counter isn't right in some situations
2022-04-15: v1.5.0
manifest v3 for versions 1.5.0 onwards
(only for Google Chrome for now, Firefox doesn't support manifest v3 yet)
no more than 3 concurrent tabs at at time; wait for tabs to finish loading before loading more
fork from version v1.4.1
2023-02-14: v1.4.7
added "X" condition to rules. Use this if you want to skip launching the bookmark
prevent multiple consecutive clicks
2022-08-20: v1.4.6
badge will show number of sites left to load
2022-07-25: v1.4.5
buffer list of URL before launching
launch URL one at a time with a 5 second timeout to complete loading before proceeding to the next URL
2022-04-15: v1.4.3
removed 1 second delay in opening tabs
revert to original code for opening tabs
2022-04-15: v1.4.2
manifest v2 for Firefox
no more than 3 concurrent tabs at at time; wait for tabs to finish loading before loading more
Release history: common for both Google Chrome and Mozilla Firefox (up to version 1.4.1)
2021-08-05: v1.4.1
changed icon
not setting badges anymore, status reflected in icon colour
open release history page when extension is updated
2021-06-11: v1.4.0
rules support month condition
if the folder "mCoffee" isn't found, launch the website https://sites.google.com/view/extension-mcoffee/
2021-05-25: v1.3.3
tweaked badge background colours, badge icon shows the time of when the extension was last clicked
bug fixes
2019-08-10: v1.3.1
new tag "Autostart"
2018-11-26: v1.2.0
rules support time range in 24h format. For example, 19-21 to launch bookmarks between 7PM and 9PM inclusive.
support for "Weekday", "Weekend"
2018-11-21: v1.1.0
New subfolder, "Rules"
Credits
Icon for version up to version 1.4.0 is from http://icongal.com/gallery/icon/34007/128/coffee_cup_breakfast_mocca.
Icon from version 1.4.1 and above is mine.
Legal Disclaimer adapted from https://termly.io/resources/templates/sample-disclaimer-template-guide/
Disclaimer
THIS EXTENSION IS PROVIDED IN GOOD FAITH, HOWEVER I MAKE NO REPRESENTATION OR WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, REGARDING THE ACCURACY, ADEQUACY, VALIDITY, RELIABILITY, AVAILABILITY, FUNCTIONALITY OR COMPLETENESS OF ANY INFORMATION ON THE EXTENSION.
UNDER NO CIRCUMSTANCE SHALL I HAVE ANY LIABILITY TO YOU FOR ANY LOSS OR DAMAGE OF ANY KIND INCURRED AS A RESULT OF THE USE OF THIS EXTENSION.
YOUR USE OF THE EXTENSION IS SOLELY AT YOUR OWN RISK.