New Userscript

try to take over the world!

目前為 2017-04-01 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  try to take over the world!
// @author       You
// @match        https://www.zhihu.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';
    var style = document.createElement("style");
    style.innerHTML = `a {
    color: hsl(31, 80%, 84%);
}


.zu-top {
    background: -webkit-linear-gradient(top,hsl(35, 27%, 98%),hsl(31, 26%, 85%));
    border-bottom: 1px solid hsl(31, 26%, 73%);
}


.zu-top-add-question {
    background: linear-gradient(to bottom,hsl(32, 23%, 98%),hsl(31, 23%, 89%));
    border: 1px solid hsl(31, 27%, 84%);
}


.zu-top-nav-li.current {
    background: linear-gradient(to bottom,hsl(31, 26%, 86%),hsl(31, 24%, 84%));
}

.zu-top-search-input {
    border: 1px solid hsl(31, 27%, 84%);
}


.zu-top-search-form .zu-top-search-button {
    background: linear-gradient(to bottom,hsl(32, 23%, 98%),hsl(31, 23%, 89%));
    border: 1px solid hsl(31, 27%, 84%);
}`;
    console.log("run!");
    document.getElementsByTagName('head')[0].appendChild(style);
    document.getElementById('q').placeholder = '搜索你感兴趣的床单...';
    // Your code here...
})();