WhatsApp like it should be: no whitespace!

Removes the dumb space-wasting layout used on displays wider than 1440px.

  1. // ==UserScript==
  2. // @name WhatsApp like it should be: no whitespace!
  3. // @namespace https://itsad.am
  4. // @version 2.0.0
  5. // @description Removes the dumb space-wasting layout used on displays wider than 1440px.
  6. // @author Adam W
  7. // @match https://web.whatsapp.com/
  8. // @grant none
  9. // ==/UserScript==
  10.  
  11. (function () {
  12. 'use strict';
  13.  
  14. let styles = `
  15. div.app-wrapper-web:after{
  16. display: none;
  17. }
  18.  
  19. @media screen and (min-width: 1441px) {
  20. .app-wrapper-web > div:first-of-type {
  21. height: 100% !important;
  22. top: 0 !important;
  23. width: 100% !important;
  24. }
  25.  
  26. html[dir] .app-wrapper-web > div:first-of-type {
  27. box-shadow: 0 1px 1px 0 rgba(var(--shadow-rgb),.06),0 2px 5px 0 rgba(var(--shadow-rgb),.2) !important;
  28. margin: 0 auto !important;
  29. }
  30.  
  31. html[dir] .app-wrapper-web.safari-fix .h70RQ {
  32. border-radius: 0 !important;
  33. }
  34. }
  35. `
  36. let styleSheet = document.createElement("style")
  37. styleSheet.type = "text/css"
  38. styleSheet.innerText = styles
  39. document.head.appendChild(styleSheet)
  40. })();