您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
隐藏新闻推荐,居中显示
当前为
// ==UserScript== // @name 网易新闻美化 // @namespace http://tampermonkey.net/ // @version 0.1 // @description 隐藏新闻推荐,居中显示 // @author AN drew // @match https://*.163.com/* // @exclude https://music.163.com // @exclude https://mail.163.com // @grant none // ==/UserScript== (function() { 'use strict'; if(window.location.host=='dy.163.com') { $('#contain') && $('#contain').attr('style','display:flex; justify-content:center;'); //居中对齐 $('.post_content') && $('.post_content').css('padding-left','0px'); //内容居中 setInterval(()=>{ if(!$('.post_top').hasClass('post_top_fixed')) //分享按钮居左 { $('.post_top').addClass('post_top_fixed'); } $('.post_side').hide(); //隐藏侧边栏 $('.newsapp-qrcode').hide(); //隐藏二维码 $('.post_next').hide(); //隐藏下一篇 $('.post_recommends').hide(); //隐藏推荐 $('.ntes-nav-mobile-title').hide(); //隐藏移动端 $('.ntes-nav-select-title-lofter').hide(); //隐藏严选 $('.ntes-nav-select-title-money').hide(); //隐藏支付 $('.ntes-nav-select-title-cart').hide(); //隐藏电商 },1); } else { document.querySelector('div.post_content.post_area.clearfix') && (document.querySelector('div.post_content.post_area.clearfix').style.cssText='display:flex; justify-content:center'); //居中对齐 var parent = document.getElementById('epContentLeft'); parent && parent.insertBefore(document.querySelector('.post_crumb'),parent.childNodes[0]); //移动目录树到epContentLeft if(document.querySelector('div.post_content.post_area.clearfix') && document.querySelector('div.post_content.post_area.clearfix').childNodes[3].className=='clearfix') //删除原先目录树所在clearfix { document.querySelector('div.post_content.post_area.clearfix').removeChild(document.querySelector('div.post_content.post_area.clearfix').childNodes[3]) } document.getElementById('endText') && (document.getElementById('endText').style.cssText='margin-left:-170px;'); //内容居中 setInterval(()=>{ if(document.getElementsByClassName('post_topshare_wrap')[0] && document.getElementsByClassName('post_topshare_wrap')[0].className.indexOf('post_topshare_wrap_fixed') == -1) //分享按钮居左 { document.getElementsByClassName('post_topshare_wrap')[0].className='post_topshare_wrap post_topshare_wrap_fixed'; } document.querySelector('.post_comment_toolbar.post_comment_toolbarfix') && (document.querySelector('.post_comment_toolbar.post_comment_toolbarfix').className='post_comment_toolbar'); //固定跟帖 document.getElementById('epContentRight') && (document.getElementById('epContentRight').style.cssText='display:none;'); //隐藏侧边栏 document.querySelector('.newsapp-qrcode') && (document.querySelector('.newsapp-qrcode').style.cssText='display:none;'); //隐藏二维码 document.getElementById('post_recommend') && (document.getElementById('post_recommend').style.cssText='display:none;'); //隐藏推荐 document.querySelector('.post_next_post_wrap') && (document.querySelector('.post_next_post_wrap').style.cssText='display:none;'); //隐藏下一篇 document.querySelector('.ntes-nav-mobile-title') && (document.querySelector('.ntes-nav-mobile-title').style.cssText='display:none;'); //隐藏移动端 document.querySelector('.ntes-nav-select-title-lofter') && (document.querySelector('.ntes-nav-select-title-lofter').style.cssText='display:none;'); //隐藏严选 document.querySelector('.ntes-nav-select-title-money') && (document.querySelector('.ntes-nav-select-title-money').style.cssText='display:none;'); //隐藏支付 document.querySelector('.ntes-nav-select-title-cart') && (document.querySelector('.ntes-nav-select-title-cart').style.cssText='display:none;'); //隐藏电商 },1); } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址