Romaxx / mongodbcompass_darktheme

11 stars 1 forks source link

Alternative and easier Method #2

Open zareshahi opened 3 years ago

zareshahi commented 3 years ago

Hello i searched and find good mehtod in reddit for this purpose

Link

go to your mongodb-compass location (mine was in /lib/mongodb-compass/ otherwise find the location with which mongodb-compass)

in mongodb-compass/resources/ unpack app.asar like this:

npx asar extract app.asar destination_folder
  1. 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
});
}
  1. in the same folder, add the following line to index.html, just before the closing :

  2. 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 ..

  3. relaunch mongodb-compass, open the devtools console (CTRL+ALT+I) and type: toggleDarkMode();