Customizing Others’ Websites Using Chrome Extensions, with the Example of zhihu.com

debug
ungoogled-chromium
diary
Author

Guest_1013

Published

2026-07-08

Intro: Problems with zhihu.com

zhihu.com, as a quora-like website in China, has a lot of discussions and opinion-outputtings. What’s worse, there are always some misleading, often political and indicating, and ragebaiting hot searches (“top trends”) on the right side of every page I visit, which really annoys me.

Moreover, for whatever reason, there is a url query ?theme=dark which enables the site to be in dark mode, but there’s no explicit setting options on the web clients, and only exists in the phone APP clients.

Come on, I just want to read some physics articles, not some bullshit! I simply can’t stand it.

That’s why today I’m gonna use Stylus and ParamPilot to address the above problems.

As for how to install extensions on ungoogled-chromium, see here.

Stylus: Hiding Specific Elements and Customizations

Initial Works

Stylus allows me to hide the sidebars on the site. To do this, I did the following:

  1. Use F12 to check which elements I wish to disappear. In my case, it’s the following:
<div class="HotSearchCard">
  ...
</div>
  1. Install Stylus, and add a rule to zhihu.com:
div[class="HotSearchCard"] {
    display: none !important;
}

Then the sidebar should disappear after refreshing.

Moreover…

I tried to use it to block the ads on zhihu, as well as changing the background color and text color. After a bit of digging into CSSs and debugging, I create a git repository here on GitHub and here on Gitee.

It contains some CSS files that can be used on zhihu, bilibili, and so on. More in the README files.

This repository follows WTFPL v2.

Automatically Adding URL Queries

First Try: ParamPilot

Param Pilot allows me to automatically append strings after a given website.

After installation, just add zhihu.com and ?theme=dark and enable it; after a bit of refreshing, you should be able to see the site in dark mode. However, I noticed that in the early refreshes, there will be a short period when the site is temporarily white again. I don’t know why; maybe I will change an extension after a little bit research. But for now, I’m satisfied.