mongo compas darkmode
1. go to your mongodb-compass location (mine was in /lib/mongodb-compass/ otherwise find the location with which mongodb-compass)
(Windows = 'C:Program FilesMongoDB Compass')
2. in mongodb-compass/resources/ unpack app.asar like this:
npx asar extract app.asar destination_folder
3. in destination_folder/src/app/:
add darkreader.js and append the following function to it:
function toggleDarkMode(){
DarkReader.enable({
brightness: 100,
contrast: 90,
sepia: 10
});
}
4. in the same folder, add the following line to index.html, just before the closing </body>:
<script src="darkreader.js" charset="UTF-8" async></script>
5. repack the app and replace the old app.asar with this one (don't forget to backup the old one in case you failed the file editing):
npx asar pack . app.asar && cp app.asar ..
6. relaunch mongodb-compass, open the devtools console (CTRL+ALT+I) and type: toggleDarkMode();