-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtooltips.js
253 lines (253 loc) · 11.2 KB
/
tooltips.js
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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
export let tooltips = {
'uboPreParsingDirective': // !#
`
<ul>
<li>@syntax - !#</li>
<li>@name - uBlock Origin Pre-Parsing Directive</li>
<li>@description - The pre-parsing directives are executed before a list content is parsed, and influence the final content of a filter list.</li>
<li>@example - !#include ublock-filters.txt</li>
<li>@documentation - <a href="https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#pre-parsing-directives">uBlock Origin Wiki</a></li>
<li>@plugin-variations - May only work for uBlock Origin</li>
<li>@special-characters - !not</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'agHint': // !+
`
<ul>
<li>@syntax - !+</li>
<li>@name - AdGuard Hint</li>
<li>@description - </li>
<li>@example - !+ NOT_OPTIMIZED PLATFORM(android)</li>
<li>@documentation - <a href="https://kb.adguard.com/en/general/how-to-create-your-own-ad-filters#hints-1">AdGuard.com KB</a></li>
<li>@plugin-variations - May only work for AdGuard</li>
<li>@special-characters -</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'comment': // ! or [
`
<ul>
<li>@syntax - ! or [</li>
<li>@name - Comment</li>
<li>@description - </li>
<li>@example - ! this is a comment</li>
<li>@documentation - <a href="https://help.eyeo.com/en/adblockplus/how-to-write-filters#comments">AdBlockPlus How To</a></li>
<li>@plugin-variations - </li>
<li>@special-characters -</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'domain':
`
<ul>
<li>@syntax - </li>
<li>@name - URL To Block</li>
<li>@description - </li>
<li>@example - ||picreel.com^</li>
<li>@documentation - <a href="https://adblockplus.org/en/filter-cheatsheet">AdBlockPlus Cheat Sheet</a></li>
<li>@plugin-variations - uBlock Origin will silently convert example.com to ||example.com^ <a href="https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#hosts-files">[More Info]</a></li>
<li>@special-characters -
<a href="https://adblockplus.org/filter-cheatsheet#blocking2">||domainNameAnchor</a>,
<a href="https://adblockplus.org/filter-cheatsheet#blocking2">^separator</a>,
<a href="https://adblockplus.org/filter-cheatsheet#blocking3">|anchor</a>,
<a href="https://adblockplus.org/filter-cheatsheet#blocking1">*wildcard</a>,
,multiple</li>
<li>@function-library - </li>
<li>@tip - Ad blockers add an invisible wildcard * to the beginning and end of the URL you type in. Use the special characters above to set limits on these wildcards.</li>
<li>@tip - Browsers will silently add a slash to the end of http://domain.com, even if they don't display it.</li>
<li>@tip - There's no way to easily exclude subdomains. A filter written for domain.com will match subdomain.domain.com. To exclude subdomains, you can write a RegEx for non cosmetic filters.</li>
</ul>
`,
'exception': // @@
`
<ul>
<li>@syntax - @@</li>
<li>@name - Exception URL</li>
<li>@description - </li>
<li>@example - @@||cdn.optimizely.com/js/*.js</li>
<li>@documentation - <a href="https://help.eyeo.com/en/adblockplus/how-to-write-filters#whitelist">AdBlockPlus How To</a></li>
<li>@plugin-variations - AdBlockPlus will add a wildcard at the beginning and end of all URL's. uBlock Origin will do the same, with one exception: it silently converts example.com to ||example.com^. <a href="https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#hosts-files">More Info</a></li>
<li>@special-characters -
<a href="https://adblockplus.org/filter-cheatsheet#blocking2">||domainNameAnchor</a>,
<a href="https://adblockplus.org/filter-cheatsheet#blocking2">^separator</a>,
<a href="https://adblockplus.org/filter-cheatsheet#blocking3">|anchor</a>,
<a href="https://adblockplus.org/filter-cheatsheet#blocking1">*wildcard</a>,
,multiple</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'domainRegEx': // /regex/
`
<ul>
<li>@syntax - /regex/</li>
<li>@name - URL To Block that uses Regular Expressions</li>
<li>@description - </li>
<li>@example - /^https://www\.narcity\.com/assets/[0-9a-f]{24,}\.js/</li>
<li>@documentation - <a href="https://help.eyeo.com/en/adblockplus/how-to-write-filters#regexps">AdBlockPlus How To</a>, <a href="https://regexone.com/">RegEx Tutorial</a></li>
<li>@plugin-variations - </li>
<li>@special-characters - RegEx -[]{}()*+?.,\^$|#/</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'exceptionRegEx': // @@/regex/
`
<ul>
<li>@syntax - @@/regex/</li>
<li>@name - Exception URL that uses Regular Expressions</li>
<li>@description - </li>
<li>@example - </li>
<li>@documentation - <a href="https://help.eyeo.com/en/adblockplus/how-to-write-filters#regexps">AdBlockPlus How To</a>, <a href="https://regexone.com/">RegEx Tutorial</a></li>
<li>@plugin-variations - </li>
<li>@special-characters - RegEx -[]{}()*+?.,\^$|#/</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`, // TODO: make sure that this line displays correctly
'option': // $
`
<ul>
<li>@syntax - $</li>
<li>@name - Filter Option</li>
<li>@description - </li>
<li>@example - $script,domain=bloombergquint.com|dnaindia.com</li>
<li>@documentation - <a href="https://help.eyeo.com/en/adblockplus/how-to-write-filters#options">AdBlockPlus How To</a></li>
<li>@plugin-variations - </li>
<li>@special-characters - ~except |or ,multiple =list</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'selectorException': // #@#
`
<ul>
<li>@syntax - #@#</li>
<li>@name - CSS Selector Exception</li>
<li>@description - </li>
<li>@example - #@#.social-footer-wrapper</li>
<li>@documentation - <a href="https://help.eyeo.com/en/adblockplus/how-to-write-filters#elemhide_exceptions">AdBlockPlus How To</a>, <a href="https://www.w3schools.com/cssref/css_selectors.asp">W3Schools CSS Selectors</a></li>
<li>@plugin-variations - </li>
<li>@special-characters - CSS Selectors .#*,>+~[]=|^$:()</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'selector': // ##
`
<ul>
<li>@syntax - ##</li>
<li>@name - CSS Selector</li>
<li>@description - </li>
<li>@example - ##.component-sticky.site-header div[style*="overflow: hidden; height:"]</li>
<li>@documentation - <a href="https://help.eyeo.com/en/adblockplus/how-to-write-filters#content-filters">AdBlockPlus How To</a>, <a href="https://www.w3schools.com/cssref/css_selectors.asp">W3Schools CSS Selectors</a></li>
<li>@plugin-variations - </li>
<li>@special-characters - CSS Selectors .#*,>+~[]=|^$:()</li>
<li>@function-library - </li>
<li>@tip - Blocking an element by #id or .class are the most common. You'd type this in as example.com###id or example.com##.class</li>
<li>@tip2 - :has-text(text) or :has-text(/regex/) is a great way to block elements containing specific text</li>
</ul>
`,
'htmlFilter': // ##^
`
<ul>
<li>@syntax - ##^</li>
<li>@name - HTML Filter</li>
<li>@description - </li>
<li>@example - ##^script:has-text(===):has-text(/[\w\W]{14000}/)</li>
<li>@documentation - <a href="https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#html-filters">uBlock Origin Wiki</a>, <a href="https://www.w3schools.com/cssref/css_selectors.asp">W3Schools CSS Selectors</a></li>
<li>@plugin-variations - uBlockOrigin on Firefox only, does not work on Chrome</li>
<li>@special-characters - CSS Selectors .#*,>+~[]=|^$:()</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'htmlFilterException': // #@#^
`
<ul>
<li>@syntax - #@#^</li>
<li>@name - HTML Filter Exception</li>
<li>@description - </li>
<li>@example - #@#^script:has-text(===):has-text(/[\w\W]{14000}/)</li>
<li>@documentation - <a href="https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#html-filters">uBlock Origin Wiki</a>, <a href="https://www.w3schools.com/cssref/css_selectors.asp">W3Schools CSS Selectors</a></li>
<li>@plugin-variations - uBlockOrigin on Firefox only, does not work on Chrome</li>
<li>@special-characters - CSS Selectors .#*,>+~[]=|^$:()</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'abpExtendedSelector': // #?#
`
<ul>
<li>@syntax - #?#</li>
<li>@name - AdBlockPlus Extended CSS Selector</li>
<li>@description - </li>
<li>@example - #?#div:-abp-has(> a[target="_self"][rel="nofollow,noindex"])</li>
<li>@documentation - <a href="https://help.eyeo.com/en/adblockplus/how-to-write-filters#elemhide-emulation">AdBlockPlus How To</a>, <a href="https://www.w3schools.com/cssref/css_selectors.asp">W3Schools CSS Selectors</a></li>
<li>@plugin-variations - Specifically designed for AdBlockPlus. uBlock Origin may actually understand these just fine if you use ##</li>
<li>@special-characters - CSS Selectors .#*,>+~[]=|^$:()</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'actionOperator': // :style() :remove()
`
<ul>
<li>@syntax - :style() or :remove()</li>
<li>@name - Action Operator</li>
<li>@description - </li>
<li>@example - :style(position: absolute !important;)</li>
<li>@documentation - <a href="https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#action-operators">uBlock Origin Wiki</a>, <a href="https://www.w3schools.com/cssref/default.asp">W3Schools CSS Properties</a></li>
<li>@plugin-variations - </li>
<li>@special-characters - CSS Properties :;,()!</li>
<li>@function-library - </li>
<li>@tip - :style(position: absolute !important;) or :style(position: relative !important) is a great way to make floating toolbars not float anymore.</li>
</ul>
`,
'uboScriptlet': // ##+js()
`
<ul>
<li>@syntax - ##+js()</li>
<li>@name - uBlock Origin Scriptlet</li>
<li>@description - </li>
<li>@example - ##+js(aopr, document.getElementById)</li>
<li>@documentation - <a href="https://github.com/gorhill/uBlock/wiki/Resources-Library">uBlock Origin Wiki</a></li>
<li>@plugin-variations - May only work for uBlock Origin</li>
<li>@special-characters - ,</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'uboScriptletException': // #@#+js()
`
<ul>
<li>@syntax - #@#+js()</li>
<li>@name - uBlock Origin Scriptlet Exception</li>
<li>@description - </li>
<li>@example - </li>
<li>@documentation - <a href="https://github.com/gorhill/uBlock/wiki/Resources-Library">uBlock Origin Wiki</a></li>
<li>@plugin-variations - May only work for uBlock Origin</li>
<li>@special-characters - ,</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`,
'abpSnippet': // #$#
`
<ul>
<li>@syntax - #$#</li>
<li>@name - AdBlockPlus Snippet</li>
<li>@description - </li>
<li>@example - #$#abort-on-property-read TextDecoder; abort-on-property-read require; abort-current-inline-script _audiofanzineProductStack</li>
<li>@documentation - <a href="https://help.eyeo.com/en/adblockplus/snippet-filters-tutorial">AdBlockPlus Snippet Filters Tutorial</a></li>
<li>@plugin-variations - May only work for AdBlockPlus</li>
<li>@special-characters - ;</li>
<li>@function-library - </li>
<li>@tip - </li>
</ul>
`
};