Giter VIP home page Giter VIP logo

whatsapp-desktop-dark's Introduction


WhatsApp Desktop Dark Mode by m4heshd
WhatsApp Desktop Dark Mode by m4heshd
Total downloads Closed issues Join the chat on Telegram

Stable version: 0.4.930 (Check if this version matches with your version of WhatsApp. The mod will still work even if the versions doesn't match)

This mod is a simple tweak for WhatsApp Desktop Official version to make it look awesomely dark.

Please note that this script won't work with Microsoft store or App store version of WhatsApp desktop. You need to use the direct downloaded version linked above

Windows

WhatsApp Desktop Dark Mode Windows

macOS

WhatsApp Desktop Dark Mode Mac

DISCLAIMER:

This is not an official version of WhatsApp Desktop Dark mode. So make sure to read through this document before you use this mod because i won't be responsible for any damage you've done yourself trying to install this mod (It's not even that hard 🙄). The coding/styling behind this tweak has full transparency since I've made it open-source right here.

Is this safe?

The answer is right there on the top. This is an open source project. which literally means that you can see through the source code of this mod. So I CANNOT STEAL YOUR MESSEGES, I CANNOT TAP INTO YOUR CALLS. If you're like one of the "Anti-Vaccination" parents, please avoid using this mod. Wouldn't you rather use the official WhatsApp version with a simple tweak like this than using some random third-party app just to have a proper dark UI?

NOTE: This script will not replace any of the functionality related coding inside WhatsApp. Just the styling.

Downloads

NOTE: THIS IS NOT A MODDED VERSION OF WhatsApp. WhatsApp Desktop Dark Mode is a simple set of styling that needs to be injected to the source files of your current installation of WhatsApp. I've made it much easier by creating a installation script using NodeJS and made it easier furthermore by creating simple executable files using nexe. If you don't trust the executable files I've provided below, you can build and run it from the source code itself by following the instructions in the next section.

Installation

Make sure you have WhatsApp Desktop installed in your PC or mac first.

Please note that this script won't work with Microsoft store or App store version of WhatsApp desktop. You need to use the direct downloaded version linked above

Make sure WhatsApp Desktop is running before you start the installation. Then wait for the process to finish. That's it.

Simply extract the downloaded ZIP file and run WADark.exe on windows. For macOS you'll need to make WADark executable first, by executing chmod +x WADark from the root of extracted directory. Then run it with WADark from the same directory.

GUI installer is still in beta stage and might contain bugs. If you want to run the legacy commandline version, run with cli argument. WADark.exe cli for Windows and WADark cli for macOS.

NOTE: It's recommended not to delete the script folder after the installation because the script automatically creates a backup of your original WhatsApp source in case you need to revert back to the original version.

Custom Themes

You can find all the resources and theming related documentation right here.

How to remove the mod?

Simply rerun the script and it will ask you to restore the backup made by any previous installations. (Or use the button on top left to switch to light mode)

My WhatsApp turned back to light theme after sometime. What to do?

This means that your WhatsApp build is probably auto updated to a newer version. Rerun the script and It'll tell you if a new version is available. Even if the dark mode version is not updated, just rerun the script and install the dark mode again.

Build the installation script yourself

Building process is really simple even if you're not a pro developer. You will just need NodeJS and NPM (Usually packed with NodeJS) installed on your computer to build and run the script yourself.

Clone or download this repository, cd to that directory and enter the following commands to start the script. There are two methods you can run the script.

Method 1 (Build binaries)

  1. npm install (Wait for this to finish)
  2. npm run dist-win (Windows) or npm run dist-mac (macOS)
  3. Finally locate and run the binary file created in dist/$PLATFORM/ directory.

Method 2 (Run directly from source)

  1. npm install (Wait for this to finish)
  2. npm run run-gui for GUI installer or npm run run-cli for CLI installer

Simple as that.

Support this project

Involvement as a contributor by adding a few lines of code, fixing a bug, responding to issues, testing etc.. would be one of the most helpful methods you could support the project. If you're not a programmer but a generous person, you can send a small donation this way buy clicking the following button.

Donate to m4heshd

Or you can buy me a "ko-fi" by clicking this button

ko-fi

Got an Issue?

There can be a numerous amount of issues in the mod since I can't be testing every single corner in the styles of this huge program. That specially applies to macOS version because I'm doing all the mac development and testing on a macOS VM.

Follow this link to submit your issues and please remember to be descriptive when submitting issues. Also don't forget to attach a small screenshot if the issue is style/GUI related.

Known issues

Windows:

  • Automatically killing the WhatsApp process might take a little time or the process might repeat itself [unfixable/SW-HW dependent]

Changelog

Style changelog is available here.

License

"WhatsApp Desktop Dark Mode by m4heshd" is licensed under MIT License. So you are allowed to use freely and modify the application. I will not be responsible for any outcome. Proceed with any action at your own risk.

whatsapp-desktop-dark's People

Contributors

m4heshd avatar mamasch19 avatar sems avatar slyther avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

whatsapp-desktop-dark's Issues

Getting whatsapp Process not found OSX

OS: MacOS
Whatsapp version: 0.3.4479

I have installed whatsapp using brew, not the App Store. But I am getting the error WhatsApp process not found. Make sure WhatsApp desktop is running before installing dark mode even though whatsapp is running.
How can I debug this ?

Very unresponsive

Whatsapp is incredibly unresponsive on macos latest version of whatsapp

The application would not respond at times when opening it from background, and interaction (ie clicking buttons typing) triggers it as well

Email addresses not showing up in chat

Hey!
So... with the latest version of your code and the latest version of whatsapp, the emails are no longer visible in the chat window. The language in the screenshots is Romanian but the issue should be culture invariant :D. The view is from both sides. Other than that, big thanks for what you're doing!

image
image

Houston, we have a problem...

It was a gray and rainy day, everything seemed calm ...
Suddenly it went white again, without warning without closing and reopening.
I reapplied the MOD, but now the messages look like this:
image

I insisted, and ran again, but didn't fix it.

Please help me!

Error in installation | "Error: ENOENT: no such file or directory"

image

Backing up.. { Error: ENOENT: no such file or directory, stat 'C:\Users\M�lle\AppData\Local\WhatsApp\app-0.3.4679\resources\app.asar' at Object.fs.statSync (fs.js:948:11) at Object.statSync (C:\Users\Mölle\Downloads\whatsapp-desktop-dark-master\whatsapp-desktop-dark-master\node_modules\graceful-fs\polyfills.js:308:16) at getStatsSync (C:\Users\Mölle\Downloads\whatsapp-desktop-dark-master\whatsapp-desktop-dark-master\node_modules\fs-extra\lib\util\stat.js:60:18) at Object.checkPathsSync (C:\Users\Mölle\Downloads\whatsapp-desktop-dark-master\whatsapp-desktop-dark-master\node_modules\fs-extra\lib\util\stat.js:90:33) at Object.copySync (C:\Users\Mölle\Downloads\whatsapp-desktop-dark-master\whatsapp-desktop-dark-master\node_modules\fs-extra\lib\copy-sync\copy-sync.js:24:38) at applyDarkStyles (C:\Users\Mölle\Downloads\whatsapp-desktop-dark-master\whatsapp-desktop-dark-master\run-win32.js:87:12) at C:\Users\Mölle\Downloads\whatsapp-desktop-dark-master\whatsapp-desktop-dark-master\run-win32.js:54:29 at C:\Users\Mölle\Downloads\whatsapp-desktop-dark-master\whatsapp-desktop-dark-master\run-win32.js:233:17 at Interface._onLine (readline.js:278:5) at Interface._line (readline.js:629:8) errno: -4058, code: 'ENOENT', syscall: 'stat', path: 'C:\\Users\\M�lle\\AppData\\Local\\WhatsApp\\app-0.3.4679\\resources\\app.asar' }

My guess is it is because I have scandinavian letters in my windows user name "Mölle"?

MacOS: WhatsApp process not found + fix

MacOS 10.14.6
Whatsapp Desktop 0.3.4479 - installed from whatsapp.com
Running from Applications Directory

trying to install the mod I get this error:
WhatsApp process not found. Make sure WhatsApp desktop is running before installing dark mode

The fix I found is to add one line of code to run-darwin.js which changes the psargs from the default value of lx to ax which will get other users' processes as well as your own. I'm gonna guess that that using lax will work fine as well but I did yet not test.

ps.lookup({
        command: execPath,
        psargs: 'ax'
    },

I am still not entirely sure why whatsapp is running under a different user

Fix issue in RTL (Right To Left)

Hi,
First of all, great addon, saved my eyes!
About a year ago, WhatsApp decided to do unclear thing and changed the position of the 3 buttons (red, yellow, green) to the left, even when the system's & app's main language is an RTL language (like Hebrew).

Well, after sending their support a few bug reports and they told me it has been done on purpose (what I can’t believe is true, you may see the screenshot and think so yourself).
The fix should be very easy with CSS (I guess it's just some float: right;), so I'd really appreciate if you'll add it to the addon and make it the best thing WhatsApp could have (;

Image for illustration (Its more noticeable in light theme, but still blocking some functionality on both light and dark):
Screenshot at Jun 06 10-53-42

Thanks,
Ido.

Voice Note Playback Bar Style Issue

The voice note bar for sent voice notes has a green-ish background. Probably not the same bar as the one used for received voice notes.

Sent VN:

voice note green-ish bar

Received VN for comparison:

voice note white bar

Chat bubbles dont change colour, making the text unreadable

App updated itself (Version 0.3.4941), Windows 10, when I ran the script the green chat bubbles didnt change but everything else did. The text being white makes it almost impossible to use.

Thanks for making this app and hope this isnt too hard to fix!

EACCES: permission denied

Error: EACCES: permission denied, unlink '/Applications/WhatsApp.app/Contents/Resources/app.asar'
at Object.unlinkSync (fs.js:976:3)
at mayCopyFile (/Volumes/misc/WADark-mac/node_modules/fs-extra/lib/copy-sync/copy-sync.js:59:8)
at onFile (/Volumes/misc/WADark-mac/node_modules/fs-extra/lib/copy-sync/copy-sync.js:54:10)
at getStats (/Volumes/misc/WADark-mac/node_modules/fs-extra/lib/copy-sync/copy-sync.js:48:44)
at startCopy (/Volumes/misc/WADark-mac/node_modules/fs-extra/lib/copy-sync/copy-sync.js:38:10)
at handleFilterAndCopy (/Volumes/misc/WADark-mac/node_modules/fs-extra/lib/copy-sync/copy-sync.js:33:10)
at Object.copySync (/Volumes/misc/WADark-mac/node_modules/fs-extra/lib/copy-sync/copy-sync.js:26:10)
at /Volumes/misc/WADark-mac/run-darwin.js:100:28
at /Volumes/misc/WADark-mac/node_modules/asar/lib/asar.js:162:18
at writeFileListToStream (/Volumes/misc/WADark-mac/node_modules/asar/lib/disk.js:42:10) {
errno: -13,
syscall: 'unlink',
code: 'EACCES',
path: '/Applications/WhatsApp.app/Contents/Resources/app.asar'
}

Title Bar

Hello,

I have been waiting for this for a year now. I used a dark mode chrome extension and used whatsapp web in chrome. You made my life easier by sharing this awesome tool. Thank you soooo much for that. :)

I changed the title bar colour to dark but the ticks were invisible. Can you tell me a colour code that's good enough to show the ticks as well?

New Whatsapp Update Overwrites MOD...

after new update of Whatsapp, applied again WADark, applied without problems.
After a few minutes, the update message appeared again ...
Is this normal or is it disabled?

how long does it take?

image
ERROR: specified service does not exist as installed service

I am installing with the site version of whatsapp as specified in the instructions, but got stuck at this step and does not proceed.

An Error during build the app on Windows

Hi, I tried to build the app on Windows but there is a problem when I use npm install so the problem is:

C:\Users\Candyseul\Desktop\WADark-Windows\whatsapp-desktop-dark (master) ([email protected])
λ npm install

> [email protected] postinstall C:\Users\Candyseul\Desktop\WADark-Windows\whatsapp-desktop-dark\node_modules\resourcehacker
> node scripts/install.js

Downloading ResourceHacker by Angus Johnson...
_http_client.js:131
  var expectedProtocol = defaultAgent.protocol;
                                      ^

TypeError: Cannot read property 'protocol' of undefined
    at new ClientRequest (_http_client.js:131:39)
    at request (http.js:44:10)
    at Object.get (http.js:48:15)
    at Object.<anonymous> (C:\Users\Candyseul\Desktop\WADark-Windows\whatsapp-desktop-dark\node_modules\resourcehacker\scripts\install.js:23:20)
    at Module._compile (internal/modules/cjs/loader.js:776:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:787:10)
    at Module.load (internal/modules/cjs/loader.js:643:32)
    at Function.Module._load (internal/modules/cjs/loader.js:556:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:839:10)
    at internal/main/run_main_module.js:17:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely

I know there's an issue similar to this one but in macOS ( #11 #25 #31 ), I already contacted the Dev of this module (resourcehacker) via E-Mail also I opened an issue on the repo too but unfortunately the repo did not get any updates from Feb 11, 2016, so I don't if the Developer will reply to my issue or E-Mail. If you know a way how to prevent this problem from happening please let me know.
N.B:
OS: Windows 10 1903
node: 12.10.0
npm: 6.10.3
yarn: 1.17.3

Could not build the source on my system.

[email protected] postinstall /Volumes/misc/whatsapp-desktop-dark/node_modules/resourcehacker
node scripts/install.js

Downloading ResourceHacker by Angus Johnson...
_http_client.js:107
var expectedProtocol = defaultAgent.protocol;
^

TypeError: Cannot read property 'protocol' of undefined
at new ClientRequest (_http_client.js:107:39)
at request (http.js:42:10)
at Object.get (http.js:46:13)
at Object. (/Volumes/misc/whatsapp-desktop-dark/node_modules/resourcehacker/scripts/install.js:23:20)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: node scripts/install.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Add a separate color for seen and send messages

While we need to change the looks of the desktop app we need to alter the accent but by default, it also alters the seen and send color, it would be great if you could add another color and set that to send and seen option in CSS.

Again the microphone

Well, it's fixed but in the chat, not in the part where all the contacts show.

image

Message Info Headers still in White w/Lt Gray Text

If after sending a message you mouse over the upper right corner of the post and press the down arrow and choose Message Info, the column opens on the right and the Read By, Remaining, Delivered To and Remaining are all in White with Lt. Gray text. Will attempt to send a screen shot.
Capture

[not an issue] [enhancement] Userscript implementation?

Very cool. I'm just wondering, is it possible to add a userscript to the whatsapp desktop app?
I usually use this userscript to hide my contacts and the currently open chat with a hotkey, but I haven't really used the desktop app cos I haven't been able to get the userscript.
The userscript is like this. Again, I'm not even sure if it can be implemented into the app, but it would be pretty epic if it's possible.

// ==UserScript==
// @name         Whatsapp Web Privacy Mode lite
// @namespace    graphen
// @version      1.8
// @description  Add button and hotkey to hide contact names on web.whatsapp.com
// @author       Graphen
// @match        https://web.whatsapp.com/
// @icon         https://i.imgur.com/LeZuNg7.png
// @grant        none
// ==/UserScript==

/* jshint esversion: 6 */
(function() {
        'use strict';
        var hidden = false;
        window.addEventListener('load', () => {
         document.addEventListener("keydown", function(e) {
             var keyCode = e.keyCode;
             if(keyCode==115) {
                 toggleShowHide();
             }
         }, false);
        });
        function toggleShowHide() {
          var sidepanel = document.getElementById('pane-side');
          var contactname = document.getElementsByClassName('_1lpto')[0];
            if (hidden) {
                console.log("WA Privacy: Toggled show.");
                try {   // show
                    sidepanel.setAttribute('style', 'display:block');
                    contactname.setAttribute('style', 'visibility:visible !important;');
                } catch(err) {
                    console.log("toggleShow: " + err);
                }
            } else {
                console.log("WA Privacy: Toggled hide.");
                try {   // hide
                    sidepanel.setAttribute('style', 'display:none');
                    contactname.setAttribute('style', 'visibility:hidden !important;');
                } catch(err) {
                    console.log("toggleHide: " + err);
                }
            }
            hidden = !hidden;
        }
    })();

Color roll back fix for updated WhatsApp

  • So the WhatsApp desktop app goes back to original color if you update it.
  • I tried a bunch of methods and came up with this and it's working properly.
  • But it can be fixed by changing the version in here in the repository.

`npm install` fails on MacOS with "TypeError: Cannot read property 'protocol' of undefined"

Building from source fails on my MacOS Mojave 10.14.4:

 ➜ /tmp/whatsapp-desktop-dark git status
On branch master
Your branch is up to date with 'origin/master'.

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

	modified:   package-lock.json
	modified:   package.json

no changes added to commit (use "git add" and/or "git commit -a")
 ➜ /tmp/whatsapp-desktop-dark git checkout package.json
 ➜ /tmp/whatsapp-desktop-dark npm install

> [email protected] postinstall /private/tmp/whatsapp-desktop-dark/node_modules/resourcehacker
> node scripts/install.js

Downloading ResourceHacker by Angus Johnson...
_http_client.js:131
  var expectedProtocol = defaultAgent.protocol;
                                      ^

TypeError: Cannot read property 'protocol' of undefined
    at new ClientRequest (_http_client.js:131:39)
    at request (http.js:44:10)
    at Object.get (http.js:48:15)
    at Object.<anonymous> (/private/tmp/whatsapp-desktop-dark/node_modules/resourcehacker/scripts/install.js:23:20)
    at Module._compile (internal/modules/cjs/loader.js:936:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
    at internal/main/run_main_module.js:17:11
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `node scripts/install.js`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/ntsaou/.npm/_logs/2019-09-13T11_59_45_779Z-debug.log

Since I am on Mac, I removed the line "resourcehacker": "4.2.51" from package.json and everything works. Amazing work, thank you :)

Unfortunately, I have not worked with node or npm, so I do not how to create different package.json files for the 2 platforms.

No background-highlight when @-calling group chat members

  1. Type "@" in a group chat with multiple people
  2. Press Up/Down arrow keys on the keyboard (do not use the mouse) for member selection
  3. The background highlight color (of the member's name who will be auto-filled when you press Enter) will be absent

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.