📅  最后修改于: 2022-03-11 14:59:27.337000             🧑  作者: Mango
1. go to your mongodb-compass location (mine was in /lib/mongodb-compass/ otherwise find the location with which mongodb-compass)
(Windows = 'C:\Program Files\MongoDB 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
: 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();