Besides that I don't like its installation is a curl into bash and then the script itself curls data from internet (from another repository https://github.com/HorlogeSkynet/thunderbird-user.js); not a good practice. But besides that point that get ignored anyway...
A tip: You can use in a single sed
command multiple -e
. So you would need to run sed only once and load the file only once (or only a few times). Like this: sed -e 's/abc/ABC/g' -e 's/def/DEF/g' file.ext
and you can have each of them on their own line too:
sed \
-i \
-e 's/abc/ABC/g' \
-e 's/def/DEF/g' \
user.js
Why do you have so many huge block of whitespaces, such as 10 empty lines in row, multiple times throughout the script? An why are there so many unused lines of code, commented out? I think you should delete them completely to not confuse people. If you want do additional features people can use optionally, then either create options for that or create another script that can be run if its installed (check if file exists and then run it if user installed it).
These are just a few thoughts I had when looking into the code.