TL;DR - I created a chrome extension to modify font styles of code text on GitHub to make my life a bit easier.
GitHub Repository, a star is really appreciated 😀
As almost everyone out there, I love to spend a good amount of time on GitHub to manage my personal and professional projects but I also love to just explore other people's projects as well. It's fun to learn how other great developers do their magic.
So I end up spending a lot of my time reading code on GitHub, SPOILER ALERT! But I had one very specific problem which was kind of annoying me. The font styles of code text on GitHub. I had two problems:
- The font size was very small. I had to pay real close attention to read the code. I know I can just increase the zoom but it makes rest of the app out of proportion. I just wanted to increase the
font-sizeof the code text.
- Kind of very specific to me but as a lover of aesthetic, I wanted my GitHub font of code text to match my code editor font.
As everyone, first I started to look on the internet to find something that would solve my above problems. After a few hit and trials with the existing solutions, nothing really actually solved it.
So I decided, fuck it, let me do it myself. I had no idea how chrome extensions are built, the chrome API, etc. All I knew was, I had a problem, I knew what the solution I wanted and luckily I have been programming in JS/TS for the past few months and this is the language needed to make the extension.
Initially the extension was very specific to my need. It had no UI interface. Although, it did solve my problem. It would change the
font-size of the code text elements on the DOM to whatever font name and font size I provided. It was hard coded, so If I needed to alter it, I had to change the source code, reload the extension, refresh the GitHub page for it to update.
It was uhh..., okay for me, but then I decided to take it to a next level. A UI interface( browser action popup ) which opens when you click on the extension icon. It let's you enter font name and font size and apply them instantly to all the GitHub tabs open. Again, I did this to save my time when I wanted to make changes to my custom font styles.
So finally, today, I am releasing this extension to public as I think its decent enough. Check out the GitHub Repository on how you can install the extension, currently it's not published on the chrome store.