// ==UserScript==
// @name 百度夜间模式
// @namespace http://tampermonkey.net/
// @version 1.1
// @description Baidu night mode
// @author Mattew
// @match https://*.baidu.com/*
// @match https://baidu.com/*
// @match http://*.baidu.com/*
// @match http://baidu.com/*
// @grant none
// ==/UserScript==
(
function() {
'use strict';
function black(){
var lg = $("#result_logo");
if(lg.length==1){
$(lg).html('<img src="//www.baidu.com/img/[email protected]" width="101" height="33" border="0" alt="到百度首页" title="到百度首页">')
}
$("#head_wrapper.s-ps-islite .s-p-top").css("width","80%");
$("#head_wrapper").css("width","800px");
$(".s_form").css("width","800px");
$("#search").css("background-color","#222");
$("body").css({"background-color":"#222","color":"rgba(200,200,200,1)"});
$("#rs").css("background-color","#222");
$("#head").css("background","#333");
$("#s_tab").css("background","#333");
$("#s_tab b").css({"background":"#333","border-bottom":"2px solid rgba(2,156,129,1)"});
$("#content_right").css({"background":"#333","border-left":"1px solid #333","border-radius":"10px","padding-top":"20px"});
$("a").css({"color":"rgba(200,200,200,.9)","background":"rgba(0,0,0,0)"});
$("strong").css("background","rgba(0,0,0,0)");
$("b").css("color","rgba(2,156,129,1)");
$("em").css("color","rgba(245,245,249,1)");
$("input").css("color","rgba(230,230,230,1)");
$("#c-tip-con").css("background-color","#333");
$("strong > .pc").css("background","#555");
$("#foot").css({"background":"#333","border-top":"1px solid #333"});
$("#help").css("background","#333");
$(".s_btn").css({"background":"#555","border-bottom":"1px solid #555","border-radius":"20px"});
$(".s_ipt_wr").css({"background":"rgba(26,26,26,1)","border-radius":"20px","padding-left":"10px","border":"1px solid rgba(26,26,26,1)","margin-right":"10px"})
$(".c-summary").css("color","rgba(200,200,200,1)");
$(".EC_newppim").remove();
$(".layout").remove();
$(".c-table").css("background-color","rgba(0,0,0,0)");
$("th").css("background-color","rgba(0,0,0,0)");
$(".soutu-btn").css("background","#333url(https://ss1.bdstatic.com/5eN1bjq8AAUYm2zgoY3K/r/www/cache/static/protocol/https/soutu/img/camera_new_5606e8f.png) no-repeat");
$(".s_ipt").css("background-color","rgba(0,0,0,.2)");
$(".bdsug").css({"background-color":"rgba(26,26,26,1)","color":"#fff","border":"none","box-shadow":"none","padding-top":"3px","margin-left":"6px","border-radius":"10px"});
$(".bdsug-feedback-wrap").css({"background-color":"rgba(26,26,26,1)","color":"#fff","border-radius":"10px"});
$(".bdsug li").css({"background-color":"rgba(26,26,26,1)","color":"#fff","padding-left":"30px","width":"auto"});
}
setInterval(function(){
let timeNow = new Date()
let hourNow = timeNow.getHours()
if (hourNow > 18) {
black();
}
if (hourNow < 7) {
black();
}},300);
// Your code here...
})();