|
1 | | -#  Colored diffs |
| 1 | +#  Colorediffs |
2 | 2 |
|
3 | | -This is an extension that colors boring diffs sent by notifiers for Git, |
4 | | -Subversion, CVS, Mercurial, etc. |
5 | | - |
6 | | -The project was originally authored by Vadim Atlygin, and for a time it has |
7 | | -been maintained by Jesse Glick (jglick). Now the torch has passed to Qeole. |
8 | | - |
9 | | -## Presentation |
10 | | - |
11 | | -A lot of developers use Git or other version control systems. Most of them also |
12 | | -receive special notifications from the system about changes other people do. |
13 | | -They might be useful in various ways: someone wants to check if there are bugs |
14 | | -in the new code, someone just wants to keep knowledge of code base up-to-date. |
15 | | -But looking over that black-on-white letter is so boring. That's why we decided |
16 | | -to color it up a bit. |
| 3 | +Color diffs in the emails you receive. This is typically helpful for reviewing |
| 4 | +patches formatted with Git or other version control systems. |
17 | 5 |
|
18 | 6 | ## Installation |
19 | 7 |
|
20 | | -### Get it from Mozilla add-ons platform… |
| 8 | +### Get it from Thunderbird's Add-Ons Platform… |
21 | 9 |
|
22 | | -[Available here](https://addons.mozilla.org/en-US/thunderbird/addon/colored-diffs/) |
| 10 | +[Available here](https://addons.thunderbird.net/en-US/thunderbird/addon/colored-diffs/) |
23 | 11 |
|
24 | | -### … Or install it manually |
| 12 | +### … Or Install it Manually |
25 | 13 |
|
26 | | -[Install locally](https://developer.mozilla.org/en-US/Add-ons/Thunderbird/Building_a_Thunderbird_extension_7:_Installation) |
27 | | -or |
28 | | -[package it into a .xpi file](https://developer.mozilla.org/en-US/Add-ons/Thunderbird/Building_a_Thunderbird_extension_8:_packaging). |
| 14 | +Pack the add-on as an .xpi file and install it from the “gear” menu in |
| 15 | +Thunderbird's add-on manager. |
29 | 16 |
|
30 | | -Under UNIX-like systems you can create the .xpi file by simply running: |
| 17 | +On UNIX-like systems, you can create the .xpi file by simply running: |
31 | 18 |
|
32 | 19 | $ cd /path/to/colorediffs/ |
33 | 20 | $ make |
34 | 21 |
|
35 | | -## What the add-on can do |
36 | | - |
37 | | - |
38 | | - |
39 | | -Well, not so much… It can color your diffs, it can show them in side-by-side |
40 | | -mode if you like. Also it converts all the filenames in message log into links |
41 | | -so you can quickly jump to the file you want to review. Ah, and it can make |
42 | | -space and tabs chars visible. You can look through list of SupportedFormats to |
43 | | -see what are the supported VCSs. |
44 | | - |
45 | | -## Ideas for future contribution |
46 | | - |
47 | | -The original author of the project wanted this add-on to include the following |
48 | | -features: |
| 22 | +Note that this will download (with curl) the latest version of the highlight.js |
| 23 | +library, which is not included in this repository. |
49 | 24 |
|
50 | | - 1. Highlighting the actual difference between the lines. |
51 | | - 2. Coloring the syntax of the language used. |
52 | | - 3. Checking new code against few rules in order to estimate the quality of |
53 | | - it. |
| 25 | +## Usage |
54 | 26 |
|
55 | | -But these are pretty big tasks, and development of the add-on is not so active |
56 | | -by now. If you want to help, though, do not hesitate to contribute by dropping |
57 | | -an issue or a PR! |
| 27 | +Once installed, the add-on should automatically detect diffs in your plain-text |
| 28 | +messages and color them with the selected theme. Some options are available in |
| 29 | +the add-on preference page: |
58 | 30 |
|
59 | | -## Contribution |
| 31 | +- You can select the color scheme amongst all the styles supported by |
| 32 | + highlight.js. |
| 33 | +- You can have tabs and white space characters replaced by visible characters. |
| 34 | +- You can set the length for tab characters (defaults to 8). |
| 35 | +- You can choose to color all plain-text messages (even with no diffs), which is |
| 36 | + mostly useful to avoid visual discomfort when using a style with a dark |
| 37 | + background and browsing a mailing list. |
60 | 38 |
|
61 | | -If you know how to do something better, whether it's code, icons, default color |
62 | | -scheme, just contact me. Also please visit the [issues |
63 | | -list](https://github.com/jglick/colorediffs/issues) and comment on issues you'd |
64 | | -really like to be done first. |
| 39 | +## Versions |
65 | 40 |
|
66 | | -## Firefox extension |
| 41 | +**Version 2+ of the add-on is compatible with Thunderbird stable version 78.4 |
| 42 | +and onward.** It uses the `messageDisplayScripts` API which was added in |
| 43 | +Thunderbird 82, and backported to 78.4. |
67 | 44 |
|
68 | | -There isn't one and probably never will be, sorry. I could make it work for |
69 | | -diff in `<pre>` sections (most mail lists archives format them like this) but |
70 | | -it would never work in GMail and other Web mail systems where it would be |
71 | | -actually useful. It's just plain hard to find the code between the lines of |
72 | | -normal text. But you could ease you pain with [Bookmarklet](Bookmarklet.md) I |
73 | | -wrote when your needs is simple (like mail list archives) and [GreaseMonkey |
74 | | -script](http://userscripts.org/scripts/show/26684) written by Fabrice |
75 | | -Bellingard for GMail. Thanks for understanding. |
| 45 | +Older versions of the add-on work with Thunderbird |
| 46 | +[up to the version 68](https://github.com/Qeole/colorediffs/tree/e51d1aab6390d11a5ee2ec84e1cf42fd08564a41#version-notes). |
76 | 47 |
|
77 | | -## Version notes |
| 48 | +The distinction is due to Thunderbird's move to MailExtensions. As a |
| 49 | +consequence of this change, version 2.0.0 of the add-on is a complete rewrite |
| 50 | +(by Qeole) and works differently from the previous versions. Instead of parsing |
| 51 | +the diffs and rebuilding the messages itself, the add-on embeds and injects the |
| 52 | +[highlight.js library](https://highlightjs.org/) which takes care of the |
| 53 | +colors, without reformatting the content of the message. |
78 | 54 |
|
79 | | -* Version 0.5 is the last one with support for Thunderbird 2. I'm too tired of |
80 | | - more than two years old JavaScript engine. |
| 55 | +## Status |
81 | 56 |
|
82 | | -* Version 0.7 does not support SeaMonkey anymore, because the new maintainer |
83 | | - does not use it and does not wish to test add-on compatibility. But the code |
84 | | - has not changed much, and this is probably just a matter of enabling support |
85 | | - again in install.rdf file. So if some tech-savvy SeaMonkey user tests and |
86 | | - confirms compatibility, I will enable it again. |
| 57 | +The project was originally authored by Vadim Atlygin. For a time it has |
| 58 | +been maintained by Jesse Glick (jglick), and it has now passed to Qeole. |
87 | 59 |
|
88 | | -* Versions 0.8 and 0.9 should work with Thunderbird 60 (although I did not |
89 | | - manage to fix preferences settings, so it comes with fixed color choices, |
90 | | - unless users resort to the config editor). Later Thunderbird versions are |
91 | | - expected to deprecate XUL-based extensions, which means the add-on will not |
92 | | - remain compatible unless it undergoes major rework. |
| 60 | +This add-on is mostly in maintenance mode, do not expect new features. Several |
| 61 | +people are using it to review patches for their daily jobs, so the objective is |
| 62 | +essentially to keep something basic, but that works. |
93 | 63 |
|
94 | | -* Version 1.9 works with Thunderbird 68. Note that the preference menu remains |
95 | | - completely broken (I even removed the button to display it), therefore you'll |
96 | | - have to work with the default options or to use Thunderbird's config editor. |
97 | | - This version has not been tested on older Thunderbird versions. Conversely, |
98 | | - version 0.9 and earlier of the add-on cannot be loaded on Thunderbird 68+. |
| 64 | +Nonetheless, you are welcome to report issues or to submit pull requests. |
0 commit comments