改百度搜索的导航栏字体为黑色

防止屏蔽广告后看不清字体

// ==UserScript==
// @name         改百度搜索的导航栏字体为黑色
// @version      0.3
// @description  防止屏蔽广告后看不清字体
// @author       You
// @run-at       document-start
// @match        https://www.baidu.com/*
// @match        https://m.baidu.com/*
// @license      MIT
// @grant        none
// @namespace https://greasyfork.org/users/452911
// ==/UserScript==

(function() {
    'use strict';
const url = window.location.href;
if (url.indexOf("wd=") !== -1 || url.indexOf("word=") !== -1) {
  const style = document.createElement('style');
  style.innerHTML = `
    span.se-tab-tx.se-tab-cur.se-tab-nxt {
      color: black;
    }
    span.se-tab-tx,
    span.se-head-tabfilter-text {
      color: #666666;
    }
  `;
  document.head.appendChild(style);
}
    // Your code here...
})();