-
Notifications
You must be signed in to change notification settings - Fork 0
/
greasemonkey.syntax
34 lines (34 loc) · 1.01 KB
/
greasemonkey.syntax
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
---
name: Greasemonkey
fileTypes:
- user.js
firstLineMatch: // ==UserScript==
scopeName: source.js.greasemonkey
uuid: B57ED36B-65DD-492A-82D7-E6C80253BAAB
foldingStartMarker: // ==UserScript==
patterns:
- name: support.class.greasemonkey
match: \bunsafeWindow\b
- name: support.function.greasemonkey
match: \bGM_(registerMenuCommand|xmlhttpRequest|setValue|getValue|log|openInTab|addStyle)\b(?=\()
- name: meta.header.greasemonkey
begin: // ==UserScript==
end: // ==/UserScript==\s*
patterns:
- name: meta.directive.standard.greasemonkey
captures:
"1":
name: keyword.other.greasemonkey
"3":
name: string.unquoted.greasemonkey
match: // (@(name|namespace|description|include|exclude))\b\s*(.+\s+)?
- name: meta.directive.nonstandard.greasemonkey
captures:
"1":
name: keyword.other.greasemonkey
"3":
name: string.unquoted.greasemonkey
match: // (@(\S+))\b\s*(.+\s+)?
- include: source.js
foldingStopMarker: // ==/UserScript==
keyEquivalent: ^~G