// ==UserScript== // @name 网站访问优化 // @namespace http://www.aezo.cn/ // @version 1.4.0 // @description [1] 去掉iview文档页小广告 // [2] 设置hub.kubeapps.com详情页宽度 // [3] 简书详情页面宽度 // [4] CSDN二维码登录去除,自动点击查看更多 // @author smalle // @match https://*.iviewui.com/* // @match https://hub.kubeapps.com/* // @match https://www.jianshu.com/* // @match *://*.csdn.net/* // @require http://cdn.bootcss.com/jquery/1.8.3/jquery.min.js // @grant GM_addStyle // @downloadURL none // ==/UserScript== (function() { 'use strict' // Your code here... window.onload = function() { main.run() } let main = { run: function() { // [1] 隐藏iview官网友情提示 if (location.host.match(/www.iviewui.com/ig)) { GM_addStyle(` .wrapper-container-tip-out{display:none !important;} `) } // [2] 设置hub.kubeapps.com详情页宽度 if (location.host.match(/hub.kubeapps.com/ig)) { GM_addStyle(` .chart-details__content[_ngcontent-c2] {max-width: 1920px;} @media (min-width: 52.5em) .chart-details__content__info[_ngcontent-c2] {width: 26%;} `) } // [3] 简书详情页面宽度 if (location.host.match(/www.jianshu.com/ig)) { GM_addStyle(` ._gp-ck {width: 1200px;} ._3Pnjry {left: calc((100vw - 1500px)/2 - 78px);} `) } // [4] CSDN二维码登录去除,自动点击查看更多 if (location.host.match(/blog.csdn.net/ig)) { // 清除二维码登录弹框 var csdn_passportbox = document.getElementById('passportbox') if(csdn_passportbox) csdn_passportbox.remove() var csdn_login_mark = document.getElementsByClassName('login-mark') if(csdn_login_mark && csdn_login_mark.length > 0) { for(var i = 0; i