Google search "old style"

Change style in google search results page to look like the old design

目前為 2021-06-28 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

/* ==UserStyle==
@name:fr      Google page de résultats "classique"
@name         Google search "old style"
@namespace    https://github.com/Procyon-b
@version      1.2.4
@description:fr  Change le style dans la page de résultats de google pour ressembler à l'ancien design (2019, sans icône)
@description  Change style in google search results page to look like the old design
@author       Achernar
@license      CC BY-NC 4.0
@preprocessor stylus

@var checkbox hide-favicon 'Hide favicons' 1
@var checkbox invert-lines 'Invert lines' 1
@var checkbox font-size    'Reduce results font size' 1
@var range    font-sizeV   '  size' [0.9, 0.7, 1, 0.01]
@var checkbox get-ws       'Recover whitespace' 1
@var checkbox head-mg      '  Title margin' 1
@var range    line-h       "  Text's line height" [1.48, 1.0, 1.7, .01]
@var range    bottom-mg    '  Bottom margin' [15, 0, 30, 1, 'px']
@var checkbox set-font     'Change font' 0
@var text     font-f       '  Font family' 'arial,sans-serif'
==/UserStyle== */
@-moz-document regexp("^https:\\/\\/www.google\\..*?\\/search\\?.*") {
/* version 20210628.1909 v1.2.4 */
/* google real values are: (20210626) line-h 1.57/1.58 - bottom-mg 27/30 */

/* font family */
if set-font {
  .std, .g, .g h3 {
    font-family: font-f !important;
    letter-spacing: 0;
  }
}

/* reduce result blocks font size */
if font-size {
  .g {
    --font-sizeV: font-sizeV;
    --sz-norm: 14px;
    --sz-gblk: 16px;
    --margin-b: 27px;
    zoom: font-sizeV;
  }
  /* target firefox as an alternative to "zoom" */
  @supports (-moz-appearance: none) {
    .g {
      font-size: calc(var(--font-sizeV) * var(--sz-norm));
      margin-bottom: calc(var(--font-sizeV) * var(--margin-b)) !important;
    }
    .g.g-blk span > span {
      font-size: calc(var(--font-sizeV) * var(--sz-gblk));
    }
    .g cite {
      font-size: calc(var(--font-sizeV) * var(--sz-norm));
    }
    .g h3 {
      font-size: calc(var(--font-sizeV) * 20px) !important;
    }
  }
}

/* hide result favicon */
if hide-favicon {
  .g img[height="16"][src*="data:image"][width="16"] {
    display: none;
  }
}

/* invert the 2 lines */
if invert-lines {
  .g div.r > a > br:first-child ~ h3,
  .g .rc > div.yuRUbf > a > br:first-child ~ h3,
  .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3,
  .g > div.yuRUbf > a > br:first-child ~ h3 {
    display: block;
  }
  .g div.r > a > br:first-child ~ h3 ~ div,
  .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div,
  .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3 ~ div,
  .g > div.yuRUbf > a > br:first-child ~ h3 ~ div {
    position: static;
    margin-top: -0.2em;
  }
  .g div.r > a > br:first-child ~ h3 ~ div *,
  .g .rc > div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3 ~ div *,
  .g > div.yuRUbf > a > br:first-child ~ h3 ~ div * {
    color: green !important;
  }
  .g div.r > a > br:first-child,
  .g .rc > div.yuRUbf > a > br:first-child,
  .g .tF2Cxc > div.yuRUbf > a > br:first-child,
  .g > div.yuRUbf > a > br:first-child {
    display: none;
  }
  .g div.r > a ~ div,
  .g .rc > div.yuRUbf > a ~ div,
  .g .tF2Cxc > div.yuRUbf > a ~ div,
  .g > div.yuRUbf > a ~ div {
    position: static;
    margin-top: -1.6em;
    margin-bottom: 1.6em;
  }
}

/* whitespace */
if get-ws {
  if head-mg {
    .g div.r > a > br:first-child ~ h3,
    .g .rc > div.yuRUbf > a > br:first-child ~ h3,
    .g .tF2Cxc > div.yuRUbf > a > br:first-child ~ h3,
    .g > div.yuRUbf > a > br:first-child ~ h3 {
      margin-bottom: -1px;
    }
    if invert-lines {
    }
  }
  if line-h != 1.57 {
    .g .st, .g .s > div,
    .g .rc .aCOpRe, .g .rc .IsZvec > div,
    .g .tF2Cxc .aCOpRe, .g .tF2Cxc .IsZvec > div, .g.tF2Cxc .IsZvec > div {
      line-height: line-h;
    }
  }
  if bottom-mg != 27px {
    .g {
      --margin-b: bottom-mg;
      margin-bottom: bottom-mg;
    }
  }

}

/* to prevent the userstyle from disappearing from stylus menu when all options are disabled */
.none {
  dummy:1;
}

}