File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed
Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ npm build.js
4949* [ ] ` GM_download `
5050* [ ] ` GM_addValueChangeListener `
5151* [ ] ` GM_getResourceURL `
52- * [ ] Additional APIs as needed
52+ * [ ] ` GM_log `
5353
5454### Editor
5555
Original file line number Diff line number Diff line change @@ -105,15 +105,15 @@ export const GM_API_DEFINITIONS = {
105105
106106 // Resources & Network APIs
107107 GM_getResourceText : {
108- signature : "declare function GM_getResourceText(name: string): string;" ,
108+ signature : "declare function GM_getResourceText(name: string): Promise< string> ;" ,
109109 name : "GM_getResourceText" ,
110110 el : "gmGetResourceText" ,
111111 tmName : "GM_getResourceText" ,
112112 category : GM_API_CATEGORIES . RESOURCES_NETWORK ,
113113 description : "Gets the content of a resource as text"
114114 } ,
115115 GM_getResourceURL : {
116- signature : "declare function GM_getResourceURL(name: string): string;" ,
116+ signature : "declare function GM_getResourceURL(name: string): Promise< string> ;" ,
117117 name : "GM_getResourceURL" ,
118118 el : "gmGetResourceURL" ,
119119 tmName : "GM_getResourceURL" ,
Original file line number Diff line number Diff line change 4949 }
5050
5151 getText ( resourceName ) {
52- return this . contents . get ( resourceName ) || null ;
52+ return Promise . resolve ( this . contents . get ( resourceName ) || null ) ;
5353 }
54-
54+
5555 getURL ( resourceName ) {
56- return this . urls . get ( resourceName ) || null ;
56+ return Promise . resolve ( this . urls . get ( resourceName ) || null ) ;
5757 }
5858
5959 static fromScript ( script ) {
You can’t perform that action at this time.
0 commit comments