Google search "old style"

Fix style in google search results page

目前為 2020-01-19 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

/* ==UserStyle==
@name         Google search "old style"
@namespace    https://github.com/Procyon-b
@version      1.0.2
@description  Fix style in google search results page
@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]
==/UserStyle== */
@-moz-document regexp("^https:\\/\\/www.google\\..*?\\/search\\?.*") {
/* version 20200119.2130 */

/* reduce result blocks font size */
if font-size {
  .g {
    --font-sizeV: font-sizeV;
    --sz-norm: 14px;
    --sz-gblk: 16px;
    /*zoom: 90%;*/
    zoom: font-sizeV;
  }
  @supports (-moz-appearance: none) {
    .g {
      font-size: calc(var(--font-sizeV) * var(--sz-norm));
      margin-bottom: calc(var(--font-sizeV) * 27px);
    }
    .g.g-blk 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 {
  img[height="16"][src*="data:image"][width="16"] {
    display: none;
  }
}

/* invert the 2 lines */
if invert-lines {
  br + h3 {
    position: relative;
    top: -1.2em;
  }

  div.r > a > div:first-child {
    position: relative;
    top: 1.9em;
  }
  div.r > a > div:first-child * {
    color: green;
  }

  div.r > a + div {
    top: 1.9em;
  }
}

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

}