国易堂去头部、文章页二维码、右侧热门推荐等广告

头部、文章页二维码、右侧热门推荐等广告

// ==UserScript==
// @name         国易堂去头部、文章页二维码、右侧热门推荐等广告
// @namespace    http://tampermonkey.net/
// @version      0.5
// @description  头部、文章页二维码、右侧热门推荐等广告
// @author       Dragon
// @match        https://www.guoyi360.com/*
// @require      https://cdn.staticfile.org/jquery/3.5.1/jquery.min.js
// @icon         data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA3CAYAAAC2EuL1AAAACXBIWXMAAAsTAAALEwEAmpwYAAAUnElEQVRogaWaaXMb15WGn9sLGkA3VmIhKYKkKFr7Yi3WOI48Uynbyef8vswvyC8YT0VTTsqecdVYijROSRQpkhJIcce+9zofegFAUYudW9UiIHT3Pe89yz3nPVd4nufxi4eH5/kXgOu6gECWJUB84Bn/myRJiODWsQTh715wCUAghEAIgvn87x8jn+s6uK6N8ougedPggEBQgeu6WJaFaZqYpollWViWhW3b0WVZFp7nIQTIsoKiKCiKTCKRJKkn0ZM6iqIgSVIwh3+5rhfNFc73/iGC+/2/Hw1yvDIerusihECSJGRZARwsy6bVatNsNmg0GrTbbdrtDt1Ol/6gT7/vX67rIkkCRVFJJOLous78uXNUKgssLS5jGAayLCOEiOZ0HAfXdYMFkPmgIk9D/hhz9Tx3Soue5+E4LoPhkF63y8uXL9nZqXJ8ckKz0aTdbtMbDHBtO1ogz/OwHQdFFqhKDEVRkBUZWZJJJBMYRopcLkcmkyabzbG8vEypVCKVSiFJPirHcRBCirTt///ZiP05HRzH+jhNhssghMB1PWzLotXpcHx0zN7eHo8ePWJ9fZ3jk2NazRa9Tg/LtVEVhUQiQSwWgJJlFEVBVdXIlGzbDkxYoCgKhmGQz+e5ceMGq6urnDt3jmw2QzKZDKXB8zwURcbz5MC336/aj9Jk+HKAwWBIo9FgY2Od9fUN1tfXqVarHB0d0e/3abfbdLtdJEUiHvPNMRaLEYvFUGMx8Dwcx8G2bRzHxXMdJFkGBJZlRgBmZgosLi5y5coVb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4yQSCXq9XhAsemiqRjabpVJZQFFkYpqGvq9Tq9XodjpIsoRp24yGIwaDfpTtOK6LN3EGIKRRJrlYSZZ94QMqI5PJMDs7y2ef+fvs/fv3mZ0tk0gk8HNu8U4//CDIcMTjcTRNQ1VVGo0GR0dHGIZBOp1hfv5cQDekiAcHhhRFiao+z/Nwg3puaJpYoxGWbSMJgRAy4EZa9YsCmbimoWlaxMZfuXKFL774gjt37nDx4kWSyWTASnhvtcx/NchwWzEMA0XxC9xxb9AlnkgwPz9PMplgdnaWvb199vf3/cpcVaLto9vtMlSUgJn3D/75525kYrEYuq6TyWQol8sUigWKxSKVSoXFyiJLS0sUi8WIoJoipj9yfNRhpZBL1XUjOnUlSQJZUXx/TKXJ5wtkMlmy2WzAtWTI5XJkD7J0Oh36/X6UdPt0hYahG2RzWbKZDIVikcXFCrOzs5TLZebmZslms2hanPGJjmj5Pxog/KIDhNMMu+f5pyUHwRGWkHjtdru0O21azSYnJyccHh4G3SoTIfBpCQS5XJaZmRmKRZ+TMQyDbDZLPK6hKCpqYAkhB3vWIcEPyRqdrXNd56NBnn5JeBpZCkBKQmBZNiNzxGAwoNfr0el0sEwTN2g9hEuaTCYxDAPDMFBV/2ycf65u3G8JZuLjjmSfls8/l+c6NsJxrF8F8q0X4uLaDo7rBnWhQ3QY2PWQZIlkIhkc+zz7HeGY7q/88zIpjvPuvvzHv3H8QRIgZIEiybhIwW8+oeObj/uBdxA1bKPP/6RMiue+Y9JfOcJ2GUIgn5LQC+mAjxbw1OdfOf4fTADLf8krBe0AAAAASUVORK5CYII=
// @license      MIT
// @grant        none
// ==/UserScript==

(function() {
  'use strict';
  // Your code here...

  // 使用jq删除第一个script标签
  //$('head script:first').remove();
  
  // 删除导航条
  $('#nav').remove();
  // 删除置顶条
  $('#top').remove();
  // 删除当前栏目标题
  $('.index-title').remove();
  // 删除右侧热门排行、推荐内容等
  $('#pd-box #pd-y').remove();
  // 删除分享按钮等——此处效果不好,保存的html还是会加载,因为有js写入html到文件,更好的方式是直接删除js引入,见下面代码
  $('#dangqianweizhi #fxd').remove();
  
  // 此方式删了无效,保存的html还是有分享按钮
  //$('#bdshare').remove();
  
  // 删除百度分享js引入
  $('#bdshare_js').remove();
  $('#bdshell_js').remove();
  
  // 删除头部广告内容
  $("#header").remove();
  // 删除上面的二维码广告
  $('table').remove();
  
  // nth-child(1) 表示父元素中子元素为第一的并且名字为div的标签被选中
  document.querySelector("#article_content > div.content > div:nth-child(1)").remove();
  
  // 文章详细信息删除:时间阅读数等
  $('.wenzhang-xx').remove();
  
  // 删除 您可能感兴趣的文章 等内容
  $('#punlun .pd-ztitle2').remove();
  $('#punlun .pd-y-list2').remove();
  
  // 删除文末导航
  $('#dibubox').remove();
  
  // 删除百度分享等内容,直接暴力删除js引入
  $('head script').map((i, v) => {
    if (v.src.includes("jquery") || v.src.includes("lmcommon")) {
      console.log(v.remove())
    }
  });
  
  // 删除文末引用说明
  var elements = document.getElementsByTagName('p');
  for (var i = 1; i < elements.length; i++) {
    if (elements[i].innerHTML.includes('本文出自国易堂')) {
      elements[i].remove()
    }
  }
})();