(code: string)
| 411 | } |
| 412 | |
| 413 | export function getMetadataStr(code: string): string | null { |
| 414 | const start = code.indexOf("==UserScript=="); |
| 415 | const end = code.indexOf("==/UserScript=="); |
| 416 | if (start === -1 || end === -1) { |
| 417 | return null; |
| 418 | } |
| 419 | return `// ${code.substring(start, end + 15)}`; |
| 420 | } |
| 421 | |
| 422 | export function getUserConfigStr(code: string): string | null { |
| 423 | const start = code.indexOf("==UserConfig=="); |
no outgoing calls
no test coverage detected