Google Card-Style UI

Greatly Beautify Google UI!

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name        Google Card-Style UI
// @description Greatly Beautify Google UI!
// @author      Fei Sun
// @version     2.0.3
// @include       *://*.google.*/search*
// @namespace https://greasyfork.org/users/35010
// ==/UserScript==
/*jshint multistr: true */
let CSSBlock = document.createElement("style");
let commonCSSText = `
.vt6azd,.g,.tF2Cxc.asEBEc {
  margin-bottom:5px;
}
.cu-container {
  display: none;
}
.srp {
--center-width: 692px;
}
.hlcw0c .MjjYud {
padding:0;
box-shadow:none;
}
.HnP70e,.Ww4FFb {
  background:transparent;
}
.hpfc8d,.hlcw0c {
  padding:0;
}
`;
let darkCSSText = `
.dG2XIf,.sG4Xue,g-inner-card, .euDXsc .rmxqbe {
  background:transparent;
}
.MjjYud,.hlcw0c{
  padding:20px;
  background-color:#2d3137;
  margin-bottom:20px;
  border-radius:24px;
}
.k8XOCe {
background:#26272a;
}
.FalWJb {
background:transparent;
}
`;
let lightCSSText = `
.MjjYud,.hlcw0c{
  padding:20px;
  background-color:#fff;
  margin-bottom:20px;
  border-radius:24px;
  box-shadow:2px 2px 15px rgba(0,0,0,.08);
}`;
(function () {
  CSSBlock.innerHTML = commonCSSText;
  if (getComputedStyle(document.body)["background-color"] != "rgb(255, 255, 255)") {
    CSSBlock.innerHTML += darkCSSText;
  }
  else {
    CSSBlock.innerHTML += lightCSSText;
  }
  document.body.appendChild(CSSBlock);
})();