javascripthtmlgoogle-chrome-extensionfile-extension

Making a Chrome extension to read custom file types


I've been working on a compiler for a custom conditional formating language, and I want to be able to open files in my language in Chrome by double-clicking on them in File Explorer (I am on Windows).

I know that I can make a .exe that will open my file type (.uif), but that would only work for opening outside of chrome and I need <a href="file.uif"> tags to work as well.

I already have the compiler as a JavaScript file, but I'm not sure how to make a chrome extension control how files are read or if it can even be done. Any help would be appreciated.


Solution

  • I figured out the answer. I just had to set chrome as the default browser for .uif.

    Then, I made a content script for my chrome extension which interprets .uif files and translates it to HTML.