An open-source extension that uses highlight.js for syntax highlighting for code on all websites with a 'pre' and 'code' tags. You can find the source code here

Code Highlighter - Firefox Add-on
Code Highlighter is an open-source Firefox add-on that allows syntax highlighting for code on websites with 'pre' and 'code' tags. It utilizes highlight.js library for this purpose.
Add-on stats
Ranking
Other platforms
Not available on Chrome
Not available on Android
Not available on Edge
Add-on safety
Risk impact
Code Highlighter requires a few sensitive permissions. Exercise caution before installing.
Risk impact analysis details
- Critical Allows access to all websites, posing a significant security risk as it can monitor and modify data from any visited site.
- High ******* ******* **** *** ****** ***** *** ***** ** ******* **** ********* ********* ** * *********** *****
- Low ******* ****** ** *** ********* ********
Risk likelihood
Code Highlighter has earned a fairly good reputation and likely can be trusted.
Risk likelihood analysis details
- High This extension has low user count. Unpopular extensions may not be stable or safe.
- Low **** ********* *** ******* **** **** * ****** **** ***** ******** *** **** ****** ** ** ****** *** *****
- Low **** ********* *** ***** **** **** * ****** **** ***** ********** *** **** ****** ** ** ****** *** *****
Upgrade to see full risk analysis details
Similar add-ons
Here are some Firefox add-ons that are similar to Code Highlighter: