Tampermonkey 新建脚本
- // ==UserScript==
- // @name discuz 屏蔽id
- // @namespace discuz
- // @include */viewthread.php*
- // @include */thread*
- // @include */redirect.php*
- // @include https://*.chiphell.com/*
- // ==/UserScript==
- var dogs = new Array("nApoleon");
- for (x in dogs) {
- b = document.evaluate('//table/tbody[tr[1]/td[1]//a[text()="' + dogs[x] + '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
- if (b.snapshotLength) {
- for (var i = 0, c = ''; i < b.snapshotLength; i++) {
- c = b.snapshotItem(i).firstChild.childNodes[3].textContent.replace(/\s*/g, '').slice(0, 2);
- c = (Number(c) > 9) ? c + '楼' : c
- b.snapshotItem(i).innerHTML = '';
- }
- }
- d = document.evaluate('//form/table/tbody[tr/td[2]/cite/a[text()="' + dogs[x] + '"]]', document, null, XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE, null);
- if (d.snapshotLength) {
- for (var i = 0, c = ''; i < d.snapshotLength; i++) {
- d.snapshotItem(i).innerHTML = '';
- }
- }
- }
复制代码 |