// ==UserScript==
// @name 【伟哥自用】tsmnt 广告净化(弹窗与广告注入拦截)
// @namespace CB@https://bbs.tampermonkey.net.cn
// @version 1.0.0
// @description tsmnt.com 去广告:钉死 visits 频控 cookie、按黑名单清扫广告脚本加载链(vdn/hi*-cpv* 弹窗引擎、vdn/gd*.js Monetag 注入、a2+ 广告位、指纹追踪)、跨域 window.open 守卫防 popunder。保留 a1.js(站点导航栏)与原生图片/翻页功能。
// @author 朱焱伟
// @license MIT
// @match *://tsmnt.com/*
// @match *://*.tsmnt.com/*
// @run-at document-start
// @noframes
// @grant none
// ==/UserScript==
/*
* Background (reverse-engineered 2026-10, evidence in analysis/):
*
* 1. Ad serving is layered behind a frequency gate: js/dh.js counts visits in a
* `visits` cookie (incremented every pageview), and the actual ad loaders
* check it before firing:
* - js/vtj.js -> (desktop) js/pc.js -> on paginated pages, when visits>3,
* randomly loads vdn/hi1-4.js (even visits) or vdn/cpv1-4.js (odd
* visits). These are the click-triggered popup engines: clicking
* "next page" (or anything) randomly opens a new ad page.
* - cdn/pic.js -> (desktop) vdn/gd.js -> when visits>4, injects a
* gummy-debt.com script (Monetag-family popunder).
* - vdn/gds.js (visits>4), tsmnt/a2+a4+a5+a6+a8.js: banner/placeholder
* ad slots and trackers.
* - tsmnt/a8.js additionally loads js/dh.js, js/vtj.js and js/fp.js
* (FingerprintJS) and reports a tracking pixel to xs.255155.xyz.
* 2. EXCEPTION: tsmnt/a1.js writes the SITE NAVIGATION (.nav#navh) plus three
* empty ad placeholder spans - it must stay. Only a2+ are pure ad slots.
* 3. Images and pagination are plain
/ in the static HTML; no gallery
* script is required for normal browsing.
*
* Strategy (four independent layers):
* L1 Cookie pin: set `visits=0` at document-start. Every ad loader reads
* this cookie before firing, so all gates stay shut even if a loader
* script slips through the sweep.
* L2 Script sweep: MutationObserver (debounced full-document sweep)
* removes