东方财富新版本页面优化去广告

2024/5/24 10:58:15

// ==UserScript==
// @name        东方财富新版本页面优化去广告
// @namespace   Violentmonkey Scripts
// @match       *://quote.eastmoney.com/concept/*
// @grant       none
// @version     1.1
// @author      -
// @grant        GM_addStyle
// @license MIT
// @description 2024/5/24 10:58:15
// ==/UserScript==
(function () {
  const classesToHide = [
    '.hlinetg',
    '.scatg',
    '.emleftfloattg',
    '.footertg',
    '.footer2016',
    '.feedback',
    '.guid',
    '.bp2sll',
    '.bp2slr',
    '#posteditor',
    '.csiderbox:nth-of-type(1)',
    '.csiderbox:nth-of-type(2)',
    '.csiderbox:nth-of-type(5)',
    '.csiderbox:nth-of-type(8)',
    '.history',
    '.zxg_t',
    '.backtop',
    '.zxght'
  ];

  classesToHide.forEach(className => {
    GM_addStyle(`${className} { display: none !important; }`);
  });


  GM_addStyle('#mainlist { max-height: 600px !important;overflow: hidden;overflow-y: auto;width: 1200px}');
  GM_addStyle('.table_list {width: 1200px}')
  GM_addStyle('.mock {z-index: 999999999999999999}')
  GM_addStyle('.bp2sr {position: fixed;top: 26px; right: 12px; overflow-x: auto; height: 1000px;padding-bottom: 24px}');
  GM_addStyle('::-webkit-scrollbar { display: none !important;}');
  GM_addStyle('.mainbody { margin-left: 260px !important }');
  GM_addStyle('.zxglist_ul { height: 800px !important;}');
  document.body.style.overflow = 'hidden';
  document.body.style.overflow = 'auto';
  function reorderDivs() {
    var parent = document.querySelector(".bp2sr");
    var children = Array.from(parent.getElementsByClassName("csiderbox"));
    children.reverse();
    parent.innerHTML = '';
    children.forEach(function(child) {
      console.log(child)
      parent.appendChild(child);
    });
  }
  window.addEventListener('load', reorderDivs);
})()

QingJ © 2025

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