-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathv2ex_script.txt
More file actions
68 lines (55 loc) · 1.74 KB
/
Copy pathv2ex_script.txt
File metadata and controls
68 lines (55 loc) · 1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
// ==UserScript==
// @name v站纯净模式
// @namespace http://tampermonkey.net/
// @version 2025-06-04
// @description Disappear Recommended Video
// @author Villiam
// @match https://v2ex.com/
// @icon https://www.google.com/s2/favicons?sz=64&domain=v2ex.com
// @grant none
// @license MIT
// @downloadURL https://update.greasyfork.org/scripts/501560/B%E7%AB%99%E7%BA%AF%E5%87%80%E6%A8%A1%E5%BC%8F.user.js
// @updateURL https://update.greasyfork.org/scripts/501560/B%E7%AB%99%E7%BA%AF%E5%87%80%E6%A8%A1%E5%BC%8F.meta.js
// ==/UserScript==
(function() {
'use strict';
// Your code here...
function displayNone(domTag) {
const domSelector = document.querySelector(domTag)
if(domSelector) {
domSelector.style.display = 'none'
}
}
// 创建一个新的<style>元素
var style = document.createElement('style');
style.type = 'text/css';
// 定义CSS规则
var css = `
/* 首页信息流 */
.item,
#TopicsHot,
/* 删了就失效了, 不知道为啥 */
.pop-live-small-mode {
display: none!important;
}
`;
if (style.styleSheet) {
// 兼容IE的写法
style.styleSheet.cssText = css;
} else {
// 其他浏览器的写法
style.appendChild(document.createTextNode(css));
}
// 将样式应用到文档中
document.head.appendChild(style);
// home-page
// vidoe-recommend
displayNone('main.bili-feed4-layout')
// displayNone('.header-channel')
// displayNone('.header-channel-fixed')
// video-page
// vidoe-recommend-list
// displayNone('.recommend-list-v1')
// live-recommend
// displayNone('.pop-live-small-mode')
})();