新浪博客显示全宽原图

read blog.sina.com.cn with full width image

目前為 2023-05-10 提交的版本,檢視 最新版本

// ==UserScript==
// @name         新浪博客显示全宽原图
// @version      0.1
// @namespace    https://github.com/fangj
// @description   read blog.sina.com.cn with full width image
// @author       fangj
// @match        https://blog.sina.com.cn/*
// @grant        none
// @license MIT
// ==/UserScript==

(function () {
  'use strict';
  console.log("sina ad remove work!")
  document.addEventListener('DOMSubtreeModified', function (event) {
    try {
      let ad = document.getElementById("container");


      if (ad) {
        ad.remove()
      }



      document.getElementById("column_2").style.width = "100%";
      document.getElementById("sinablogbody").style.width = "100%";
      document.getElementsByClassName("articalContent")[0].style.width = "100%";
      let imgs = document.querySelectorAll("a>img");
      let aimgs = Array.from(imgs).filter(d => d.className == "");
      aimgs.forEach(img => {
        let link = img.parentNode.href;
        console.log(link)
        img.src = link
      })
    } catch (error) {
      console.error(error);
    }
  }, true);



})();

QingJ © 2025

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