Open-source project
adlered/CSDNGreener avatar
adlered/CSDNGreener

CSDNGreener: a Tampermonkey userscript that strips CSDN's ads and overlays

《专 业 团 队》🕺🏿 🕺🏿 🕺🏿 🕺🏿 ⚰️🕺🏿 🕺🏿 🕺🏿 🕺🏿 | 专治 CSDN 广告与各种灵魂打击 | 🐵 油猴脚本 | TamperMonkey | Chrome | FireFox | CSDN 页面浮窗广告完全过滤净化 | 国服最强 CSDN 绿化脚本

4,259 stars161 forksJavaScriptMIT

At a glance

What is it?
CSDNGreener is a userscript for Tampermonkey, Violentmonkey and ScriptCat that filters advertising and floating overlays on CSDN pages. It is a browser-side DOM cleaner, not a CSDN client, and it only works where a userscript manager is installed.
Who is it for?
Install CSDNGreener if you read CSDN in a desktop Chrome or Firefox browser and already run Tampermonkey, Violentmonkey or ScriptCat, and install it from GreasyFork or OpenUserJS rather than from a mirror. Do not install it on iOS or Android, do not expect it to work under the old Greasemonkey, and do not treat it as a paywall or login bypass: the README describes ad filtering and page cleanup only.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 146 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

The problem CSDNGreener targets on CSDN pages

CSDN is a large Chinese developer blog platform, and its article pages carry advertising units and floating overlays alongside the text. CSDNGreener exists to remove those elements in the browser before the reader has to interact with them. The repository describes itself as a greening script for CSDN, where greening means cleaning up the page rather than changing the site itself.

The audience is narrow and specific: people who read CSDN articles on a desktop browser and already use a userscript manager. The README lists Chrome and Chromium-based browsers such as Edge, 360 Browser and CentBrowser as recommended, with Firefox as compatible but not the best-performing option. It explicitly excludes mobile platforms, so iOS and Android are out of scope. If you never open CSDN, the script has nothing to do.

How a userscript cleans CSDN: manager, @match, DOM removal

CSDNGreener is not a service, a proxy or a browser extension of its own. It is a single JavaScript file that a userscript manager injects into pages the file declares it should run on. The repository ships two builds: csdngreener_greasyfork.user.js and csdngreener_openuserjs.user.js, one for each distribution site. Both are plain .user.js files, which is the format Tampermonkey, Violentmonkey and ScriptCat consume.

The data flow is one-directional and local. The browser loads a CSDN page, the manager matches the URL, the script runs in the page context, and it removes or hides the ad and overlay nodes from the DOM. Nothing is sent to a server, and the repository layout shows no backend component: the top level holds only the two script files, a LICENSE, a README and two dot-directories for tooling. That architecture has a direct consequence. When CSDN changes its markup, the selectors the script relies on can stop matching, and the fix has to ship as a new version of the userscript. There is no server-side switch to flip.

Installing CSDNGreener from GreasyFork or OpenUserJS

The README is explicit that a script manager must be installed first. It names Tampermonkey and Violentmonkey as supported managers, and notes that Greasemonkey, the older manager, is too old to run the script. Install one of those extensions in Chrome or Firefox before doing anything else.

Once a manager is present, the README gives three distribution channels: GreasyFork, OpenUserJS and ScriptCat. The homepage field of the repository points at the GreasyFork listing, so that is the shortest path:

bash
https://greasyfork.org/zh-CN/scripts/378351

Open that URL with the manager already installed and the manager offers to install the script. The OpenUserJS route is described differently in the README: open the script page, then click Install in the upper right corner.

bash
https://openuserjs.org/scripts/AdlerED/%E6%9C%80%E5%BC%BA%E7%9A%84%E8%80%81%E7%89%8C%E8%84%9A%E6%9C%ACCSDNGreener%EF%BC%9ACSDN%E5%B9%BF%E5%91%8A%E5%AE%8C%E5%85%A8%E8%BF%87%E6%BB%A4%E3%80%81%E4%BA%BA%E6%80%A7%E5%8C%96%E8%84%9A%E6%9C%AC%E4%BC%98%E5%8C%96

ScriptCat is the third channel, listed in the README as a plain link to its script page. After installing from any of the three, open a CSDN article page. The expected result is the page without the advertising units and floating overlays the script targets. If the page looks unchanged, the manager did not match the URL or the script is disabled; the README does not document a troubleshooting path beyond reinstalling from one of the listed sites.

What CSDNGreener does not do

The README frames the project as filtering advertising and improving the reading experience on CSDN. It does not claim to bypass logins, unlock paid content or change what the server returns. Anyone looking for a CSDN paywall bypass is looking at the wrong tool, and the repository provides no mechanism for one: the script runs after the page has already been delivered, so anything the server withheld stays withheld.

The second limitation is environmental. Mobile browsers are excluded by the README, and the old Greasemonkey manager cannot run the script. The third is maintenance coupling. Because the script edits the DOM of a site the project does not control, every CSDN front-end change is a potential breakage. The last push to the repository was on 2026-05-09, which is more than four months before today's date, so the code has not moved recently; whether that reflects stability or a pause is not something the repository states.

CSDNGreener compared with writing your own filter rules

The closest alternative is not another CSDN script but a general content blocker with custom filter rules, such as uBlock Origin style element hiding. The difference in approach is real. A content blocker matches network requests and CSS selectors from a rule list you maintain; CSDNGreener is imperative JavaScript that runs inside the page and manipulates the DOM directly. That lets it do things a static hiding rule cannot, such as reacting to elements inserted after load, but it also means the logic lives in one file that must be updated when the site changes.

A hand-written set of uBlock rules puts you in control of the selectors and lets you patch them in seconds without waiting for a release. It also puts the maintenance on you, and a userscript that someone else keeps current is the whole point of installing CSDNGreener. The trade-off is between control and upkeep, not between two products with different features.

Licence, contribution rules and version discipline

The repository is MIT licensed, which permits reuse and modification with the licence text retained. That matters if you want to fork the script and adjust the selectors yourself; the terms are permissive, and nothing in the README adds restrictions on top. This is a description of the licence file, not legal advice.

The contribution rules expose the project's versioning convention, and it is worth reading before you file a change. Contributors are asked to bump the version in three places, and the scheme is numeric: if the third digit is below 10, increment it; if it equals 10, increment the second digit and reset the third to 0. The README gives 1.1.9 becoming 1.2.0 and 1.1.3 becoming 1.1.4 as examples. The three locations are the @version metadata line, a var version assignment, and an @note line at the top of the update description.

That convention is the upgrade cost in miniature. There is no package manager, no build step documented in the README and no changelog file in the repository root. Updates reach users through the userscript manager's own update check against GreasyFork, OpenUserJS or ScriptCat, and the README does not document a rollback procedure if a new version misbehaves.

Editorial conclusion

Install CSDNGreener if you read CSDN in a desktop Chrome or Firefox browser and already run Tampermonkey, Violentmonkey or ScriptCat, and install it from GreasyFork or OpenUserJS rather than from a mirror. Do not install it on iOS or Android, do not expect it to work under the old Greasemonkey, and do not treat it as a paywall or login bypass: the README describes ad filtering and page cleanup only. Before adopting it, open the .user.js file and check the @match rules and the version number, because the README documents no rollback path and no update channel beyond the userscript manager's own update check.

Frequently asked questions

Which browsers and script managers does CSDNGreener support?

The README recommends Chrome and Chromium-based browsers such as Edge, 360 Browser and CentBrowser, and lists Firefox as compatible though not the best-performing option. On the manager side it names Tampermonkey and Violentmonkey, and states that the older Greasemonkey cannot run the script. Mobile platforms such as iOS and Android are excluded.

Where do I install CSDNGreener?

The README lists three distribution channels: GreasyFork, OpenUserJS and ScriptCat. For OpenUserJS it says to open the script page and click Install in the upper right corner. The repository homepage points at the GreasyFork listing.

Does CSDNGreener bypass CSDN logins or paywalls?

No. The README describes the script as filtering CSDN advertising and improving the reading experience, and the script operates on the page after it has been delivered by the server. There is no mechanism in the repository for unlocking content the server did not send.

Official sources

  1. adlered/CSDNGreener on GitHub
  2. Issues
  3. License: MIT
  4. Project website
  5. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/adlered-csdngreener.svg)](https://hysenlabs.com/projects/adlered-csdngreener)