hao123-每日一新

2021/7/1上午11:02:49 hao123去广告,背景图每日一换

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

You will need to install an extension such as Tampermonkey to install this script.

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        hao123-每日一新
// @namespace   Violentmonkey Scripts
// @match       https://www.hao123.com/
// @grant       none
// @version     1.0
// @author      wangJF
// @grant       GM_xmlhttpRequest
// @require     https://cdn.bootcss.com/jquery/3.6.0/jquery.min.js
// @description 2021/7/1上午11:02:49 hao123去广告,背景图每日一换
// ==/UserScript==
jQuery.noConflict();
(function($) {
  //切换背景图片为bing
  'use strict';
    GM_xmlhttpRequest({
        url:"https://cn.bing.com/HPImageArchive.aspx?format=js&idx=0&n=1",
        method :"GET",
        onload:function(xhr){
          var resJson = JSON.parse(xhr.responseText);
          var picUrl ="url("+'https://cn.bing.com' + resJson.images[0].url+")";
          $("#gameyixingTop").css("background-image",picUrl);
        }
    });
  var gameyixingTop = document.getElementById("gameyixingTop");
  gameyixingTop.classList.remove("ewc");
  gameyixingTop.style.backgroundRepeat = "repeat";
  gameyixingTop.style.backgroundPosition = "left 0px";
  gameyixingTop.classList.remove("s-sbg2");
  var headerStyle = document.getElementById('header').style;
  headerStyle.backgroundColor = "rgba(255,255,255,0.5)";
  headerStyle.top = "0px";
  headerStyle.height = "89px";
  headerStyle.border = 0;
  $("#topColumn").css("background-color","rgba(255,255,255,0.5)");
  $(".layout-right").remove();
  $(".layout-left").remove();
  $(".hotsearchCon").remove();
  $(".notice").remove();
  $(".hotword").remove();
  $("#skinbtn").remove();
  $("#shortcut-box").remove();
  $("#footer").remove();
  $("script").remove();
  $("#topbeWrapper").remove();
  var spread = document.querySelector(".spread");
  setTimeout(function(){
    spread.click();
    $(".siye").remove();
  }, 1500);
})(jQuery);