Google Purple Theme

Replace google dark theme to purple Theme

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Google Purple Theme
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  Replace google dark theme to purple Theme
// @author       fienestar
// @match        https://www.google.com/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=google.com
// @grant        none
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    const style = document.createElement('style');
    style.innerHTML = `
.sfbg{
  background: #09001e !important;
}
#tsf > div:nth-child(1) > div:nth-child(1) > div:nth-child(2){
  border: none !important;
}
}
`;

    document.head.appendChild(style);

    [...document.querySelectorAll('style')].forEach(style => {
        let html = style.innerHTML;
        console.log('!');
        html = html.replace(/#202124/g, '#09001e')
        html = html.replace(/#303134/g, '#1a1539') // #303134 -> #24202d
        html = html.replace(/#3c4043/g, '#352f44')
        // html = html.replace(/#171717/g, '#110e18')
        html = html.replace(/#171717/g, '#09001e')
        html = html.replace(/#24202d/g, '#09001e')
        html = html.replace(/#c58af9/g, '#d3b2fe')
        style.innerHTML = html;
    });

    const gb = document.getElementById('gb');
    if(gb) gb.style.backgroundColor = ''
})();