Skip to content

Instantly share code, notes, and snippets.

@yuantailing
Last active March 10, 2024 14:49
Show Gist options
  • Save yuantailing/86cce1068e39edc518def0000e1cf4ac to your computer and use it in GitHub Desktop.
Save yuantailing/86cce1068e39edc518def0000e1cf4ac to your computer and use it in GitHub Desktop.
JS user scripts (*.user.js)
// ==UserScript==
// @name Hide boring ADs on CSDN
// @namespace http://tampermonkey.net/
// @version 0.1.2
// @updateURL https://gist.github.com/yuantailing/86cce1068e39edc518def0000e1cf4ac/raw/csdn.net.user.js
// @downloadURL https://gist.github.com/yuantailing/86cce1068e39edc518def0000e1cf4ac/raw/csdn.net.user.js
// @description Hide boring ADs on CSDN
// @author github.com/yuantailing
// @match https://*.csdn.net/*
// @match http://*.csdn.net/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
var st = document.createElement('style');
st.innerHTML = '.box-box-aways, .box-box-default, .box-box-large, .csdn-tracking-statistics.mb8.box-shadow, #asideFooter .aside-box:first-child, .pulllog-box, info-div { display: none !important; }' +
'iframe[src*="//pos.baidu.com"] { display: none !important; }';
document.head.appendChild(st);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment