Skip to content

A Tampermonkey script to prevent the some top Chinese websites links from opening in new tabs. 强制B站、微博、知乎、小红书等在同一标签页打开,禁止打开新标签页的浏览器脚本。

License

Notifications You must be signed in to change notification settings

Jingyuan-Zheng/No-New-Tab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

No New Tab for Chinese Top Websites

禁止某些国内网站新标签页打开链接

The README of this project has documentation in both English and Chinese.

中文说明可点击下方:

🎯 Completely disable all new tab opening behavior on Bilibili, Weibo,Zhihu and RedNote! Say no to redirects and enjoy a seamless browsing experience like a native app!

🚀 Core Features

  • Prevents new tab opening on Bilibili, Weibo, Zhihu, and RedNote (Xiaohongshu)
  • Covers special links in comment sections, such as:
    • User avatars
    • Usernames / IDs
    • Product cards
    • Hashtags
    • Search links
  • Even if the website tries to force a new tab, the script will intercept it and open the page in the same tab
  • Keeps your browser clean and organized by minimizing unnecessary tabs
  • Specially optimized for Bilibili search — pressing Enter or clicking the search button will stay in the current tab

📌 Installation

  1. Install a script manager 🔧

  2. Install the script with one click 📦
    Install Link

  3. Visit any Bilibili, Weibo, or Zhihu page to test the effect ✅
    Examples: Bilibili Main Site | Bilibili Live | Zhihu

📖 Changelog

v5.0 (2025-12-05)

  • Enhanced compatibility with complex page structures and dynamically injected content
  • Completely fixed the issue of links in Bilibili comment sections being forced to open in new tabs
  • Improved monitoring and handling of asynchronously loaded elements to ensure long-term stability

Previously Known Issue:

  • Links in Bilibili comment sections do not work properly ✅ Fixed

v.4.1 (2025-04-28)

  • Added support for RedNote

v4.0 (2025-02-16)

  • Added support for Zhihu and Weibo web versions
  • Fixed issues on certain pages

v3.0 (2025-02-16)

  • Completely rewrote the event interception logic
  • Fixed the new tab issue with the home button on Bilibili's match pages
  • Enhanced SPA routing whitelist

v2.0 (2025-02-16)

  • Partially rewritten to optimize behavior on certain pages
  • Added support for non-Safari browsers

v1.0 (2025-02-15)

  • Initial release: Basic link interception, Safari-only support

🤝 Contributing

Welcome to contribute in the following ways:

  1. Submit bug reports: Issue Tracker
  2. Request new features: Feature Suggestions
  3. Contribute code directly: 🚀 Fork Repository

📜 License

MIT License © 2025 ChingyuanCheng

About

A Tampermonkey script to prevent the some top Chinese websites links from opening in new tabs. 强制B站、微博、知乎、小红书等在同一标签页打开,禁止打开新标签页的浏览器脚本。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published