Google News Layout Adjustments

Remove column gaps and restore full article previews in Google News

As of 2025-05-05. See the latest version.

// ==UserScript==
// @name        Google News Layout Adjustments
// @description Remove column gaps and restore full article previews in Google News
// @match       https://www.google.com/*
// @run-at      document-start
// @version 0.0.1.20250505104625
// @namespace https://greasyfork.org/users/1435046
// ==/UserScript==

(function () {
  const css = ` .UFQ0Gb {
      column-gap: 0 !important;
    }

    .lSfe4c {
      flex-direction: column-reverse !important;
    }

    .r5bEn .gpjNTe {
      margin: 0 !important;
    }

    .gpjNTe {
      display: block !important;
    }

    .SoAPf {
      max-width: 290px !important;
      width: 100% !important;
    }

    .SoAPf .n0jPhd,
    .SoAPf .GI74Re {
      display: block !important;
      -webkit-line-clamp: unset !important;
      -webkit-box-orient: unset !important;
      overflow: visible !important;
      text-overflow: unset !important;
      white-space: normal !important;
    }

    #rcnt {
      /*google search not news*/
      column-gap: 0 !important;
    }

    /* 1) Add max-width 290px to the first result container */
    #rso > div:nth-child(1) {
      max-width: 290px !important;
    }

    /* 2) Remove the -webkit-line-clamp limitation on the snippet */
    .VwiC3b.yXK7lf.p4wth.r025kc.hJNv6b.Hdw6tb {
      -webkit-line-clamp: unset !important;
    }

    `;
  const style = document.createElement('style');
  style.textContent = css;
  document.head.appendChild(style);
})();