CH Yahoo Color-Coded Results

Change background color of Yahoo search ad areas and other special types of results.

当前为 2014-10-16 提交的版本,查看 最新版本

// ==UserScript==
// @name        CH Yahoo Color-Coded Results
// @author      clickhappier
// @namespace   clickhappier
// @description Change background color of Yahoo search ad areas and other special types of results.
// @version     1.1c
// @include     http*://search.yahoo.*/search*
// @grant       none
// ==/UserScript==

function addGlobalStyle(css) {
    var head, style;
    head = document.getElementsByTagName('head')[0];
    if (!head) { return; }
    style = document.createElement('style');
    style.type = 'text/css';
    style.innerHTML = css;
    head.appendChild(style);
}


// ads
addGlobalStyle('.ads { background-color: darkgray ! important; }');
addGlobalStyle('.east_ad_bg { background-color: darkgray ! important; }');

// shopping results
addGlobalStyle('.shpmm { background-color: lightgreen ! important; }');

// local business results
addGlobalStyle('.sc-lc-fm { background-color: #DAFFC8 ! important; }');   // light lime green
addGlobalStyle('#sc-content { background-color: #DAFFC8 ! important; }');   // light lime green

// news results
addGlobalStyle('.sys_news_auto { background-color: powderblue ! important; }');
addGlobalStyle('.DigiMagAll { background-color: powderblue ! important; }');

// image and video results
addGlobalStyle('.imgdd { background-color: thistle ! important; }');   // light purple
addGlobalStyle('.viddd { background-color: thistle ! important; }');   // light purple

// knowledge sidebar results
addGlobalStyle('#yplocal_default_rr { background-color: #FF9966 ! important; }');   // light orange
addGlobalStyle('.kgdd { background-color: #FF9966 ! important; }');   // light orange

// related search results
addGlobalStyle('#satat { background-color: moccasin ! important; }');   // light tan

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址