-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.nlf
102 lines (87 loc) · 1.89 KB
/
test.nlf
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# nlフィルタ定義(文字コード判定用なのでこの行は削除しないこと)
# これは通常のコメントなのじゃ!
[Replace]
Name = テストフィルタ(総合テスト用)
FullURL = https?://www\.nicovideo\.jp/.*
Multi = TRUE
EachLine = TRUE
Require = !(?:channel|live)\.nicovideo\.jp
idGroup = 1,2
RequireHeader = user_session_12345678_\d+
ContentType = text/html
MatchLocal = TRUE
AddList = list/NGUserId.txt
AddVariable = testVar
Match<
# 動画IDとサムネイルIDのテスト
(sm\d+).*?(thumbnail/\d+)
# NESTコマンドのテスト
$NEST(<div class="test",テスト,</div>)
# LSTコマンドのテスト
$LST("local/ngword.txt")
# INCコマンドのテスト
$INC(NGCount)テスト
# SETコマンドのテスト
$SET(testParam=value)
# TSコマンドのテスト
"($TS(local/test.js))"
# URLコマンドのテスト
www\.nicovideo\.jp/watch/($URL1)
>
Replace<
# 変数のテスト
ID: <id>
SMID: <smid>
メモリーID: <memoryId>
空き容量: <freeSpace>
動画ID: <eachSmid>
改行: <CRLF>
設定値: <nlVar:config!testParam>
バージョン: <nlVar:VERSION>
# 前方参照のテスト
マッチした動画ID: $1
サムネイルID: $2
>
[Script]
Name = スクリプトテスト
URL = www\.nicovideo\.jp
Append<
// JavaScriptのシンタックスハイライトのテスト
const testFunction = () => {
console.log("テストスクリプト");
return document.querySelector('.test').innerHTML;
};
>
[Style]
Name = スタイルテスト
URL = www\.nicovideo\.jp
Append<
/* CSSのシンタックスハイライトのテスト */
.test {
color: red;
background-color: #f0f0f0;
padding: 10px;
}
.test:hover {
opacity: 0.8;
}
>
[RequestHeader]
Name = ヘッダーテスト
URL = www\.nicovideo\.jp
Match<
http://([^/]+)/test\.html
>
Replace<
http://$1/local/test.html
>
[Debug]
[Config]
Name = 設定テスト
URL = test
Match<
テスト
>
Replace<
置換後
>