Whatsapp Web Privacy Mode

Tools to hide contact names and pictures of Whatsapp Web.

< 脚本 Whatsapp Web Privacy Mode 的反馈

评价:差评 - 脚本失效或无法使用

§
发布于:2017-11-28
编辑于:2018-02-25

2017-11 Not working anymore

Doesn't work anymore, web.whatsapp.com has changed html structure. But also the update to greasemonkey 4.0 (WebExtension) makes problems. I'll try to fix it.

edit

Fixed it and got rid of that shakey animation. [removed source code] See here for updated version: https://greasyfork.org/scripts/35966

§
发布于:2018-01-03
编辑于:2018-01-03

Is there a way to hide the button?
Also, I'm not really familiar with Javascript, HTML and CSS, but I was able to make just the contact names invisible in an older version of WhatsApp Web by reverse-engineering someone else's userstyle.
Do you think it's possible with the new WhatsApp Web/userscript?

I'm quite new to this, but I'm rather keen on learning how to do this.

§
发布于:2018-01-03

Toggling contact list only by hotkey F7:

// ==UserScript==
// @name         WA Web Privacy Mode light
// @namespace    graphen
// @version      1
// @description  Hide/show contactlist by pressing F7.
// @author       Graphen
// @match        https://web.whatsapp.com/
// @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==118) {
             toggleShowHide();
         }
     }, false);
    });
    function toggleShowHide() {
        var panel = document.getElementsByClassName('chatlist-panel-body')[0];
        if (hidden) {
            panel.setAttribute('style', 'display:block');
        } else {
            panel.setAttribute('style', 'display:none');
        }
        hidden = !hidden;
    }
})();

发布留言

登录以发布留言。