Index
Modules:
gm_api
,
gm_api/metadata
.
API symbols
`$`:
metadata: `$`(self: GmPermitions): string
metadata: `$`(self: GmRunAt): string
android:
GmInfoOs.android
arm:
GmInfoArch.arm
cros:
GmInfoOs.cros
deleteValue:
gm_api: deleteValue(gm: GmType; key: cstring): Future[void]
genMetadataBlock:
metadata: genMetadataBlock(name: string; ## Required * nameTranslations: openArray[(string, string)] = []; ## Optional namespace = "https://github.com/thisago/gm_api"; ## Optional description = "New Nim userscript"; ## Optional descriptionTranslations: openArray[(string, string)] = []; ## Optional version = "1.0.0"; ## Optional author = "You"; ## Optional icon = ""; ## Optional require: openArray[string] = []; ## Optional resource: openArray[(string, string)] = []; ## Optional supportUrl = ""; ## Optional homepageUrl = ""; ## Optional match: openArray[string] = ["*://*/*"]; excludeMatch: openArray[ string] = []; ## Optional include: openArray[string] = []; ## Optional (prefers `match`) exclude: openArray[string] = []; ## Optional (prefers `excludematch`) grant: openArray[GmPermitions] = []; ## Optional runAt = GmRunAt.docIdle; ## Optional downloadUrl = ""; ## Optional noFrames = false): string
getValue:
gm_api: getValue(gm: GmType; key, defaultValue: cstring): Future[cstring]
GM:
gm_api: GM
GmInfo:
gm_api: GmInfo
GmInfoArch:
gm_api: GmInfoArch
GmInfoOs:
gm_api: GmInfoOs
GmInfoPlatform:
gm_api: GmInfoPlatform
GmInjectInto:
metadata: GmInjectInto
GmPermitions:
metadata: GmPermitions
GmRunAt:
metadata: GmRunAt
info:
gm_api: info(gm: GmType): GmInfo
linux:
GmInfoOs.linux
listValues:
gm_api: listValues(gm: GmType): Future[seq[cstring]]
mac:
GmInfoOs.mac
mips:
GmInfoArch.mips
mips64:
GmInfoArch.mips64
notification:
gm_api: notification(gm: GmType; text: cstring; title, image = "".cstring; onclick, ondone: Callable = notification_placeholderCallback)
openbsd:
GmInfoOs.openbsd
openInTab:
gm_api: openInTab(gm: GmType; url: cstring; openInBackground = false)
registerMenuCommand:
gm_api: registerMenuCommand(gm: GmType; caption: cstring; commandFunc: Callable; accessKey: cstring)
setClipboard:
gm_api: setClipboard(gm: GmType; text: cstring)
setValue:
gm_api: setValue(gm: GmType; key, value: cstring): Future[void]
unsafeWindow:
gm_api: unsafeWindow
win:
GmInfoOs.win
x86-32:
GmInfoArch.x86-32
x86-64:
GmInfoArch.x86-64
xmlHttpRequest:
gm_api: xmlHttpRequest(gm: GmType; url, method: cstring; binary = false; context = newJsObject(); data = "".cstring; headers: openArray[(string, string)] = []; overrideMimeType, user, password = "".cstring; synchronous = false; timeout = 0; upload = newJsObject(); onabort, onerror, onload, onprogress, onreadystatechange, ontimeout: GmHttpResponse = xmlHttpRequest_placeholderCallback)