kbin-code-highlighting: Adds support for code syntax highlighting to kbin.

3 years ago by 0rito to c/kbinStyles

Uses HLJS to add syntax highlighting to kbin.

  • 0.1 - Initial launch, basic support with singular theme.
  • 0.2 - Update to remove unnecessary code.
  • 0.3 - Add support for stylesheet URLs to be specified in settings and to be stored in memory.
  • 0.3.1 - Added support for numerous kbin instances.
  • 0.4 - Preloads a dropdown with predefined stylesheets for ease of use. Reworked how stylesheets are stored. Added header for code sections that displays what language code section is in (unless poster specifies, this is best-guess based on HLJS). Added clipboard copy button and made code section collapsible.

Example, 0.1 - PowerShell
Example, 0.3 - Side by side
Example, 0.4 - JavaScript
Example, 0.4 - New functionality
Example, 0.4 - Settings and themes

load all comments
0rito 2 points 3 years ago

0.4 was just merged to main. You should update automatically if you're on 0.2. If you want to update immediately, simply click here. Notes and examples have been updated in OP.

Worth noting that some of the changes in this version are to make it easier to integrate with @shazbot megamod.

path: 0 586164, hotness: undefined, score: 2, children: 0
kbinStyles
kbinStyles

@kbin.social

login for more options
15
98
1

Custom CSS and JS to help improve your Kbin experience! ### Userscripts Greasy Fork ### Stylesheets UserStyles.world ### Userscript managers

go to feed...