Since the file contents are just plain text, you can make Explorer treat it as such. You can use Content Type
and PerceivedType
to achieve that. Here is how to do it:
- In the Registry Editor, navigate to the key related to that file type. For the file type asked, the path would be like
HKEY_CLASSES_ROOT\.js
.
- In that key, right-click the right panel and choose
New > String Value
.
- Name it as
Content Type
.
- Double click that value and set it as
text/plain
.
- Right-click the right panel and choose
New > String Value
.
- Name it as
PerceivedType
.
- Double click that value and set it as
text
.
Restart Explorer and voilá! The file will still be associated with any editor you have set but the built-in preview feature will treat it as a text file and then show a preview.
As a side effect, if you sort/group your list in Explorer as Perceived Type it will be classified under Text file.
Note: for instance I did a test by making a .dummy
and associated it with Google Chrome, the file could be previewed in the Preview Pane and double-clicking it still executed Chrome as intended.