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;
    }
})();

發表回覆

登入以回覆