├── .gitignore ├── .prettierrc.json ├── LICENSE ├── README.md ├── docs.md ├── docs └── maillinks-legacy.md ├── package-lock.json ├── package.json ├── release.py └── thunderbird-todoist ├── images ├── Icon.svg ├── create_icons.sh ├── icon.png ├── icon_16.png └── icon_32.png ├── manifest.json ├── popup.css ├── popup_compose.html ├── popup_message.html ├── scripts ├── api_utils.js ├── common.js ├── popup_compose.js ├── popup_message.js ├── settings.js └── settings_utils.js └── settings.html /.gitignore: -------------------------------------------------------------------------------- 1 | *.xpi 2 | node_modules 3 | -------------------------------------------------------------------------------- /.prettierrc.json: -------------------------------------------------------------------------------- 1 | {} 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Benjamin Schmid 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ThunderbirdTodoist 2 | Thunderbird Add-On for [Todoist](https://todoist.com). 3 | 4 | Not created by, affiliated with, or supported by Doist. 5 | 6 | ## Overview 7 | This plugin adds a button to Thunderbird to add a new task for the selected email. Project and due date can be set directly when adding a task. It is also possible to add a link to the task which opens the email in Thunderbird. 8 | 9 | ## Installation 10 | To install the add-on, visit the [add-on page](https://addons.thunderbird.net/de/thunderbird/addon/thunderbird-todoist/). 11 | 12 | You can also download the xpi file from [here](https://dl.smeanox.com/thunderbird-todoist-0.6.xpi). Open the add-ons page in Thunderbird and choose 'install from file'. 13 | 14 | ### Mail-Links 15 | To support Mail-Links (i.e. direct links from Todoist to open a mail in Thunderbird), you need to register the protocol in the OS. 16 | 17 | If you have installed this prior to version 0.6 you will need to follow the instructions below again to add support for the new protocol. Note that the URL format changed with version 0.6 of the extension. If you still have links created with a prior version of the extension, follow the instructions [here](docs/maillinks-legacy.md) to register the previously used protocol. 18 | 19 | ### Linux 20 | 21 | ``` bash 22 | cat > ~/.local/share/applications/thunderbird-todoist-mid.desktop << EOF 23 | [Desktop Entry] 24 | Type=Application 25 | Name=Thunderbird Todoist 26 | Exec=thunderbird '%u' 27 | StartupNotify=false 28 | MimeType=x-scheme-handler/mid; 29 | EOF 30 | 31 | xdg-mime default thunderbird-todoist-mid.desktop x-scheme-handler/mid 32 | ``` 33 | 34 | ### Windows (untested) 35 | 36 | Update the registry using powershell: 37 | 38 | ``` powershell 39 | $types = @('mid') 40 | Foreach ($type in $types) { 41 | $key = "HKLM:\SOFTWARE\Classes\${type}" 42 | New-Item $key -force -ea SilentlyContinue 43 | New-Item "${key}\shell" -force -ea SilentlyContinue 44 | New-Item "${key}\shell\open" -force -ea SilentlyContinue 45 | New-Item "${key}\shell\open\command" -force -ea SilentlyContinue 46 | New-ItemProperty -LiteralPath $key -Name '(default)' -Value 'URL:Thunderbird Todoist Links' -PropertyType String -Force -ea SilentlyContinue 47 | New-ItemProperty -LiteralPath $key -Name 'URL Protocol' -Value '' -PropertyType String -Force -ea SilentlyContinue 48 | New-ItemProperty -LiteralPath "${key}\shell\open\command" -Name '(default)' -Value '"C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" "%1"' -PropertyType String -Force -ea SilentlyContinue 49 | } 50 | ``` 51 | 52 | Alternatively, create a file with a `.reg` extension (e.g. `todoist-thunderbird-mid.reg`) with the following content, then double click it: 53 | 54 | ``` 55 | Windows Registry Editor Version 5.00 56 | 57 | [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mid] 58 | @="URL:Thunderbird Todoist Links" 59 | "URL Protocol"="" 60 | 61 | [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mid\shell] 62 | 63 | [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mid\shell\open] 64 | 65 | [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\mid\shell\open\command] 66 | @="\"C:\\Program Files (x86)\\Mozilla Thunderbird\\thunderbird.exe\" %1" 67 | ``` 68 | 69 | If you have issues with getting this to work, please check out [this issue](https://github.com/SmBe19/ThunderbirdTodoist/issues/13) and comment there if this does not resolve it. 70 | -------------------------------------------------------------------------------- /docs.md: -------------------------------------------------------------------------------- 1 | # Documentation for MailExtensions 2 | https://developer.thunderbird.net/add-ons/about-add-ons 3 | https://thunderbird-webextensions.readthedocs.io/en/68/ 4 | https://readthedocs.org/projects/thunderbird-webextensions/downloads/pdf/latest/ 5 | https://github.com/thundernest/sample-extensions 6 | https://developer.chrome.com/extensions/contentSecurityPolicy 7 | -------------------------------------------------------------------------------- /docs/maillinks-legacy.md: -------------------------------------------------------------------------------- 1 | # Legacy instructions for setting up Mail-Links 2 | 3 | These instructions are only applicable until version 0.5 of the extension. 4 | 5 | To support Mail-Links (i.e. direct links from Todoist to open a mail in Thunderbird), you need to register the protocol in the OS. 6 | 7 | Note that the link becomes invalid once the email has been moved to a different folder in Thunderbird. 8 | 9 | 10 | ### Linux 11 | 12 | ``` bash 13 | cat > ~/.local/share/applications/thunderbird-todoist.desktop << EOF 14 | [Desktop Entry] 15 | Type=Application 16 | Name=Thunderbird Todoist Scheme Handler 17 | Exec=thunderbird -mail '%u' 18 | StartupNotify=false 19 | MimeType=x-scheme-handler/mailbox-message;x-scheme-handler/imap-message; 20 | EOF 21 | 22 | xdg-mime default thunderbird-todoist.desktop x-scheme-handler/mailbox-message 23 | xdg-mime default thunderbird-todoist.desktop x-scheme-handler/imap-message 24 | ``` 25 | 26 | ### Windows (untested) 27 | 28 | Update the registry using powershell: 29 | 30 | ``` powershell 31 | $types = @('imap-message', 'mailbox-message') 32 | Foreach ($type in $types) { 33 | $key = "HKLM:\SOFTWARE\Classes\${type}" 34 | New-Item $key -force -ea SilentlyContinue 35 | New-Item "${key}\shell" -force -ea SilentlyContinue 36 | New-Item "${key}\shell\open" -force -ea SilentlyContinue 37 | New-Item "${key}\shell\open\command" -force -ea SilentlyContinue 38 | New-ItemProperty -LiteralPath $key -Name '(default)' -Value 'URL:Thunderbird Todoist Links' -PropertyType String -Force -ea SilentlyContinue 39 | New-ItemProperty -LiteralPath $key -Name 'URL Protocol' -Value '' -PropertyType String -Force -ea SilentlyContinue 40 | New-ItemProperty -LiteralPath "${key}\shell\open\command" -Name '(default)' -Value '"C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe" -mail "%1"' -PropertyType String -Force -ea SilentlyContinue 41 | } 42 | ``` 43 | 44 | If you have issues with getting this to work, please check out [this issue](https://github.com/SmBe19/ThunderbirdTodoist/issues/13) and comment there, if this does not resolve it. 45 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ThunderbirdTodoist", 3 | "lockfileVersion": 2, 4 | "requires": true, 5 | "packages": { 6 | "": { 7 | "dependencies": { 8 | "prettier": "^2.7.1" 9 | } 10 | }, 11 | "node_modules/prettier": { 12 | "version": "2.7.1", 13 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", 14 | "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==", 15 | "bin": { 16 | "prettier": "bin-prettier.js" 17 | }, 18 | "engines": { 19 | "node": ">=10.13.0" 20 | }, 21 | "funding": { 22 | "url": "https://github.com/prettier/prettier?sponsor=1" 23 | } 24 | } 25 | }, 26 | "dependencies": { 27 | "prettier": { 28 | "version": "2.7.1", 29 | "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.7.1.tgz", 30 | "integrity": "sha512-ujppO+MkdPqoVINuDFDRLClm7D78qbDt0/NR+wp5FqEZOoTNAjPHWj17QRhu7geIHJfcNhRk1XVQmF8Bp3ye+g==" 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "thunderbirdtodoist", 3 | "description": "Thunderbird Add-On for [Todoist](https://todoist.com).", 4 | "version": "0.4", 5 | "scripts": { 6 | "format": "prettier --write thunderbird-todoist" 7 | }, 8 | "devDependencies": { 9 | "prettier": "^2.7.1" 10 | }, 11 | "repository": { 12 | "type": "git", 13 | "url": "git+https://github.com/SmBe19/ThunderbirdTodoist.git" 14 | }, 15 | "author": "Benjamin Schmid", 16 | "license": "MIT", 17 | "bugs": { 18 | "url": "https://github.com/SmBe19/ThunderbirdTodoist/issues" 19 | }, 20 | "homepage": "https://github.com/SmBe19/ThunderbirdTodoist#readme" 21 | } 22 | -------------------------------------------------------------------------------- /release.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import json 4 | import os 5 | import zipfile 6 | 7 | with open('thunderbird-todoist/manifest.json') as f: 8 | manifest = json.load(f) 9 | 10 | version = manifest['version'] 11 | filename = 'thunderbird-todoist-{}.xpi'.format(version) 12 | 13 | with zipfile.ZipFile(filename, 'w') as zfile: 14 | os.chdir('thunderbird-todoist') 15 | for dirname, dirs, files in os.walk('.'): 16 | for fil in files: 17 | zfile.write(os.path.join(dirname, fil)) 18 | -------------------------------------------------------------------------------- /thunderbird-todoist/images/Icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 209 | -------------------------------------------------------------------------------- /thunderbird-todoist/images/create_icons.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | inkscape --without-gui Icon.svg --export-area-page --export-width=64 --export-height=64 --export-png=icon.png 3 | inkscape --without-gui Icon.svg --export-area-page --export-width=32 --export-height=32 --export-png=icon_32.png 4 | inkscape --without-gui Icon.svg --export-area-page --export-width=16 --export-height=16 --export-png=icon_16.png 5 | -------------------------------------------------------------------------------- /thunderbird-todoist/images/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmBe19/ThunderbirdTodoist/73fdaf23ebc681bd448d81284913bc11a2fa9d75/thunderbird-todoist/images/icon.png -------------------------------------------------------------------------------- /thunderbird-todoist/images/icon_16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmBe19/ThunderbirdTodoist/73fdaf23ebc681bd448d81284913bc11a2fa9d75/thunderbird-todoist/images/icon_16.png -------------------------------------------------------------------------------- /thunderbird-todoist/images/icon_32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/SmBe19/ThunderbirdTodoist/73fdaf23ebc681bd448d81284913bc11a2fa9d75/thunderbird-todoist/images/icon_32.png -------------------------------------------------------------------------------- /thunderbird-todoist/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "manifest_version": 2, 3 | "name": "Thunderbird Todoist", 4 | "description": "Extension to add tasks to Todoist", 5 | "version": "0.6", 6 | "author": "Benjamin Schmid", 7 | "applications": { 8 | "gecko": { 9 | "id": "thunderbird-todoist@apps.smeanox.com", 10 | "strict_min_version": "68.0" 11 | } 12 | }, 13 | "message_display_action": { 14 | "default_popup": "popup_message.html", 15 | "default_title": "Add Task", 16 | "default_icon": "images/icon_32.png" 17 | }, 18 | "compose_action": { 19 | "default_popup": "popup_compose.html", 20 | "default_title": "Add Task", 21 | "default_icon": "images/icon_32.png", 22 | "default_area": "maintoolbar" 23 | }, 24 | "options_ui": { 25 | "page": "settings.html", 26 | "open_in_tab": false, 27 | "browser_style": true 28 | }, 29 | "permissions": ["storage", "messagesRead"], 30 | "icons": { 31 | "64": "images/icon.png", 32 | "32": "images/icon_32.png", 33 | "16": "images/icon_16.png" 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /thunderbird-todoist/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; 3 | width: 400px; 4 | margin: 8px; 5 | } 6 | 7 | * { 8 | box-sizing: border-box; 9 | } 10 | 11 | #popup-page { 12 | width: 100%; 13 | } 14 | 15 | .popup-input input, 16 | .popup-input select, 17 | .popup-input button { 18 | width: 100%; 19 | margin-bottom: 10px; 20 | } 21 | 22 | .popup-checkbox { 23 | width: 100%; 24 | margin-bottom: 10px; 25 | } 26 | 27 | .popup-label { 28 | margin-bottom: 5px; 29 | } 30 | 31 | .popup-indented { 32 | width: 95%; 33 | margin-left: 5%; 34 | } 35 | -------------------------------------------------------------------------------- /thunderbird-todoist/popup_compose.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |